While I was walking with Ibn Umar, holding his hand, a man approached and asked, "How did you hear the Messenger of Allah ﷺ speak about the private conversation between Allah and the believer?"Ibn Umar replied, "I heard the Messenger of Allah ﷺ say, 'Allah will bring the believer near, place His shelter over him, and conceal him. He will ask, "Do you remember such-and-such sin? Do you remember such-and-such sin?" The believer will reply, "Yes, my Lord." When Allah has made him acknowledge his sins, and the believer thinks within himself that he is doomed, Allah will say, "I concealed them for you in the world, and today I forgive them for you." Then he will be given the record of his good deeds.As for the disbeliever and the hypocrites, the witnesses will declare, "These are the ones who lied against their Lord. Surely the curse of Allah is upon the wrongdoers" [Hud 11:18].'"
بينما أنا أمشي مع ابن عمر آخذ بيده، إذ عرض رجل، فقال: كيف سمعت رسول الله ﷺ يقول في النجوى؟ فقال: سمعت رسول الله ﷺ يقول: إن الله يدني المؤمن، فيضع عليه كنفه ويستره، فيقول: أتعرف ذنب كذا، أتعرف ذنب كذا؟ فيقول: نعم أي رب، حتى إذا قرره بذنوبه، ورأى في نفسه أنه هلك، قال: سترتها عليك في الدنيا، وأنا أغفرها لك اليوم، فيعطى كتاب حسناته، وأما الكافر والمنافقون، فيقول الأشهاد: {هؤلاء الذين كذبوا على ربهم ألا لعنة الله على الظالمين} [هود: ١٨].
Bukhari related it in "The Book of Injustices" (2441), and Muslim in "The Book of Repentance" (2768), both through the route of Qatada, from Safwan bin Mihraz Mazini, who mentioned it. The wording given is Bukhari's, and Muslim's wording is similar.