Sayyiduna Abdullah bin Salam (may Allah be pleased with him) says: Shall I narrate to you something on the authority of "a revealed Book" or "a Messenger Prophet"? (It is this:) "Whoever repents before being struck by the illness in which he dies, his repentance is accepted, and this will remain so until the sun rises from the west."
Al-Tabarani recorded it as a narration of Abu Fa'id from Rib'i, and I do not know Abu Fa'id; the rest of its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب التوبة / 17508