It is narrated from Sayyiduna Abdullah bin Salam (may Allah be pleased with him), who said: I do not tell you anything except on the authority of a sent Prophet or a revealed Book: If a servant commits every sin, then repents to Allah a day before his death, Allah accepts his repentance.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13992