Mihjan bin Azra 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 11034

Sahih

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

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

الأعظمي 11034صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications of adhan and prayer, and what is related to them
Section
Supplications before the taslim
Numbering
Jami al-Kamil 11034 (2nd edition)
Azami 11034