Sunan Ibn Majah
It was narrated from ‘Abdullah bin ‘Amr that the Prophet (ﷺ) said: “Allah accepts the repentance of His slave so long as the death rattle has not yet reached his throat.”
حَدَّثَنَا رَاشِدُ بْنُ سَعِيدٍ الرَّمْلِيُّ، أَنْبَأَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، عَنِ ابْنِ ثَوْبَانَ، عَنْ أَبِيهِ، عَنْ مَكْحُولٍ، عَنْ جُبَيْرِ بْنِ نُفَيْرٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ : " إِنَّ اللَّهَ عَزَّ وَجَلَّ لَيَقْبَلُ تَوْبَةَ الْعَبْدِ مَا لَمْ يُغَرْغِرْ " .
Grade: Hasan (Darussalam)
Reference