Answered by Shaykh Abdul-Karim Yahya, SunniPath Academy Teacher
How does one perform the forgetfulness prostration, meaning what does one say before and after? In the last sitting does one read the tashahhud, send blessings (salat) on the Prophet (Allah bless and grant him peace), supplicate, perform the two prostrations, and then read everything again and finally perform the salams? Or does one read everything, perform the two prostrations, and then not read everything again but just perform the salams? If what I have been doing was wrong all this time, are the prayers in which I did it wrong invalid because I have been doing it the first way I mentioned (i.e. reading everything again after the two prostrations then doing the salams)?
In The Name of Allah, Most Merciful and Compassionate
The Forgetfulness Prostration is performed after tashahhud (and all the invocations that follow it) and immediately before salams (with nothing between it and salams).[1]
If it was done as described in the first scenario above, the prayer is still valid. And Allah knows best and He alone gives success (tawfiq)
[1] See: Ibn Hajar al-Haytami, Hawashi al-Sharwani Wa Ibn Qasim al-Abbadi ‘Ala Tuhfah al-Muhtaj Bisharh al-Minhaj (Beruit, Dar Ihya’ al-Turath al-‘Arabi), 2:200.