Allah swt has promised in Quran that He will give Khilafah to the people who will have faith and do righteous deeds

Allah swt has promised in Quran that He will give Khilafah to the people who will have faith and do righteous deeds .Allah swt says:

Allâh has promised those among you who believe, and do righteous good deeds, that He will certainly grant them succession to (the present rulers) in the earth, as He granted it to those before them, and that He will grant them the authority to practise their religion, that which He has chosen for them (i.e. Islâm). And He will surely give them in exchange a safe security after their fear (provided) they (believers) worship Me and do not associate anything (in worship) with Me.

It is very much evident that Allah swt blessed Abu Bakar Umer Usman and Ali rizwanullahee aliehim ajmaeen with Khilafah on the globe .This proves that all of these companions of Holy prophet were full of Iman and were doing the righteous deeds .If Allah swt has blessed them with Khilafah due to their Iman and righteous deeds who are we to doubt their faith and righteous deeds??