The Messenger of Allah ﷺ led us in prayer and gave the salam after two rakahs. He then mentioned a hadith similar to the one narrated by Ibn Sirin from Abu Hurairah, saying, "Then he gave the salam and afterwards performed the two prostrations of forgetfulness."
حدثنا أحمد بن محمد بن ثابت حدثنا أبو أسامة ح و حدثنا محمد بن العلاء أخبرنا أبو أسامة أخبرني عبيد الله عن نافع
صلى بنا رسول الله ﷺ فسلم في الركعتين فذكر نحو حديث ابن سيرين عن أبي هريرة قال ثم سلم ثم سجد سجدتي السهو