Mihjan bin Adra reported,

The Messenger of Allah ﷺ entered the mosque and came upon a man who had just finished his prayer and was reciting the tashahhud, saying, "O Allah, I ask You, Allah, the One, the Eternal Refuge, who neither begets nor is begotten, and to whom none is equal, that You forgive me my sins, for You are the Forgiving, the Merciful."The Messenger of Allah ﷺ said, "He has been forgiven, he has been forgiven, he has been forgiven," three times.

Azami 2185

Sahih

عن محجن بن الأدرع قال

دخل رسول الله ﷺ المسجد، فإذا هو برجل قد قضى صلاته وهو يتشهد وهو يقول: اللهم إني أسألك يا الله الأحد الصمد، الذي لم يلد ولم يولد ولم يكن له كفوا أحد، أن تغفر لي ذنوبي، إنك أنت الغفور الرحيم، قال: فقال رسول الله ﷺ: قد غفر له، قد غفر له ثلاثا.

الأعظمي 2185صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Tashahhud and salam
Section
Supplications before the taslim
Numbering
Jami al-Kamil 2185 (2nd edition)
Azami 2185