Full Sharh — Riyad as-Salihin 745
وعن علي رضي الله عنه قال: كان رسول الله صلى الله عليه وسلم إذا قام إلى الصلاة يكون من آخر ما يقول بين التشهد والتسليم: "اللهم اغفر لي ما قدمت وما أخرت، وما أسررت وما أعلنت، وما أسرفت، وما أنت أعلم به مني، أنت المقدم، وأنت المؤخر، لا إله إلا أنت" ((رواه مسلم)).
English Translation
'Ali (May Allah be pleased with him) reported:: When the Messenger of Allah (ﷺ) was in Salat (prayer), he used to supplicate towards the end of prayer after Tashahhud and before the concluding salutations: "Allahum-maghfir li ma qaddamtu wa ma akh-khartu, wa ma asrartu, wa ma a'lantu, wa ma asraftu, wa ma Anta a'lamu bihi minni. Antal-Muqqadimu, wa Antal-Mu'akh-khiru. La ilaha illa Anta (O Allah! Forgive my former and latter sins, which I have done secretly and those which I have done openly, and that I have wronged others, and those defaults of mine about which You have better knowledge than I have. You Alone can send whomever You will to Jannah, and You Alone can send whomever You will to Hell-fire. None has the right to be worshipped but You.".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of the Remembrance of Allah
Hadith Number
745