Abu Hurairah reported,

The Messenger of Allah ﷺ said, "When the reciter says, 'Allah has heard the one who praises Him,' and those behind him say, 'O Allah, our Lord, to You belongs all praise,' and their words coincide with the words of the inhabitants of heaven, 'O Allah, our Lord, to You belongs all praise,' his past sins are forgiven."

Ahmad 9401

Sahih

وقال ﷺ إذا قال القارئ سمع الله لمن حمده فقال من خلفه اللهم ربنا ولك الحمد فوافق قوله ذلك قول أهل السماء اللهم ربنا لك الحمد غفر له ما تقدم من ذنبه

أحمد 9401صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 9401
Ahmad 9401