229 صحيح حديث أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: إِذَا قَالَ الإِمَامُ سَمِعَ اللهُ لِمَنْ حَمِدَهُ، فَقُولُوا: اللهُمَّ رَبَّنَا وَلَكَ الْحَمْدُ؛ فَإِنَّهُ مَنْ وَافَقَ قَوْلُهُ قَوْلَ الْمَلاَئِكَةِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ
Sayyiduna Abu Hurairah, may Allah be pleased with him, narrated that the Noble Prophet, peace and blessings be upon him, said: When the Imam says "Sami' Allahu liman hamidah," you should say "Allahumma Rabbana wa lakal hamd," for whoever's saying coincides with that of the angels, all his past sins will be forgiven.