While Ibn Umar was performing tawaf, a man approached him and said, "Abu Abdul-Rahman," or he said, "Ibn Umar, did you hear the Prophet ﷺ speak about the private conversation?"He replied, "I heard the Prophet ﷺ say, 'The believer will be brought near to his Lord,'" and Hisham said, "'The believer will draw near, until He places His shelter over him and makes him acknowledge his sins. He will say, "Do you recognize such-and-such a sin?" The believer will say, "I recognize it. My Lord, I recognize it," twice. Then He will say, "I concealed it for you in the world, and I forgive it for you today." Then the record of his good deeds will be folded up. As for the others,'" or, "'the disbelievers, they will be called out before all the witnesses, "These are the ones who lied against their Lord" [Hud 11:18].'"
قال بينا ابن عمر يطوف، إذ عرض رجل، فقال: يا أبا عبد الرحمن أو قال: يا ابن عمر! سمعت النبي ﷺ في النجوى؟ فقال: سمعت النبي ﷺ يقول: يدنى المؤمن من ربه، وقال هشام: يدنو المؤمن، حتى يضع عليه كنفه، فيقرره بذنوبه، تعرف ذنب كذا؟ يقول: أعرف. يقول رب أعرف مرتين، فيقول: سترتها في الدنيا، وأغفرها لك اليوم، ثم تطوى صحيفة حسناته، وأما الآخرون أو الكفار، فينادى على رؤوس الأشهاد {هؤلاء الذين كذبوا على ربهم}.
Bukhari narrated it in the tafsir (4685), and Muslim narrated it in the chapter on repentance (2768), both of them through the route of Hisham Dastawai, who said, Qatada narrated to us, from Safwan bin Mihraz, who said, and then he related it. The wording given is that of Bukhari, and the wording of Muslim is similar.