I know that doubting is Kufr. But if a person has doubts about Islam during their life, thus they were a disbeliever, but resolved their doubt before they died, and died with certain faith, have they died a believer because they did not repent from Kufr ?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If a person has doubts about the existence of Allah, His Oneness, the prophecy of Muhammad the Quran, or doubts anything that is known with absolute evidence in religion; if this was just an illusion or whispers, then he should repel them and not pay any attention to them, and he is not considered as a disbeliever by this.
However, if it is a firm doubt, then the person who has such doubts becomes a disbeliever and must repent to Allah.
Repentance is achieved by uttering Shahaadah (The Two Testimonies of Faith), and becoming certain regarding the matters he had doubts about.
If he has certainty before his death and he uttered The Two Testimonies of Faith, then he has re-embraced Islam, and that is his repentance.
Allah knows best.
You can search for fatwa through many choices