1- History is only some writings of some humans, and not infallible word of God!
2- God extolls Sahaba/companions of Prophet Muhammad (including Hazrat Ali)!
9:100 The foremost among the emigrants and the helpers, as well as those who followed them in noble deeds: God’s will is in harmony with them and their will in harmony with Him. He has made ready for them the evergreen Gardens, wherein they will abide eternally. This is the Supreme Triumph. [Muhaajireen = Emigrants (from Makkah). Ansaar = Those who hosted them (in Madinah). Radhi-Allahu ’anhum wa radhu ‘Anh also translates as, “God is well-pleased with them and they are well-pleased with Him.”]
9:40 If you do not help the Messenger, God will help him, as always. When the disbelievers drove him out of his home, they were just two men. They had to seek refuge in a cave. The Messenger said to his companion (Abu Bakr), “Grieve not. God is with us.” Then God sent His reassuring peace upon him, and supported him with invisible forces of faith and courage (9:26). He made the word of the disbelievers utterly low. God’s Word remains Supreme. God is Mighty, Wise.
48:18 God was pleased with the believers when they pledged allegiance to you (O Messenger) under that shady tree. For, He knew what was in their hearts, and so He sent down upon them inner peace, and rewarded them by opening the gates to a swift victory. [48:10]
48:29 Muhammad is God’s Messenger. And those who are with him are stern towards the rejecters of truth, and full of compassion towards one another. You can see them bowing (to commands), adoring (Him), as they seek God’s bounty and Acceptance. Their signs (of belief) are on their faces, the effects of adoration. Such is their likeness in the Torah and their likeness in the Gospel. They are like a seed that brings forth its shoot, and then He strengthens it, so that it grows stout, and then stands firm on its stem, delighting those who have sown it. (Thus the believers grow in strength,) so that through them He might confound with rage the rejecters. But to those who may yet attain belief and benefit others, God promises protection of their own ‘self’ and an immense reward.
[The very first sentence in this verse says, Muhammad-ur-Rasoolullah (Muhammad is God’s Messenger.) Recently, some factions that try to belittle the exalted Prophet, have been falsely claiming that this utterance is ascribed in the Qur’an only to the hypocrites in verse 63:1. How can they miss 48:29? Athar-is-sujood is frequently mistranslated as the physical mark on the forehead resulting from regular prostration. But Wajh = Countenance = Whole being = Face, and not forehead. In addition, the verses of the Bible that the Qur’an is referring to, make no mention of any physical marks on the foreheads or faces. Sujood = Adoration = Prostrations = Complete submission. ‘Signs on their faces’ = Reflection of faith in the believer’s mannerism. Torah and Gospel: Numbers 16:22. Mark 4: 27-28 - Mathew 13:3-9]
59:8 And it is for the poor refugees who have been expelled from their homelands and their property. They seek God’s bounty and approval, and support God and His Messenger. They are the ones true to their faith.
59:9 Also, (true are) those who resided in the city (Madinah) before them and attained faith. They love those who immigrated to them, and find no hesitation in their hearts in helping them. They give them preference over themselves, even though poverty be their own lot. And whoever is saved from greediness of the heart, such are the ones who truly prosper.
59:10 And those who came after them, say, “Our Sustainer! Forgive us and our brothers and sisters who preceded us in faith. And let not be any malice in our hearts toward those who have chosen to believe. Our Sustainer! You are truly Compassionate, Merciful.”
73:20 (O Messenger) your Sustainer is fully Aware that you stay up working two thirds of the night, one half of it, or one third of it, together with some of your companions. But God has designed the night and the day, and He knows that you and your companions will not even keep count of your vigil. So He turns to you in kindness. Teach them as much of the Qur’an that you can do with ease. He knows that in time some of you may be ill, and others have to travel seeking God’s bounty - And others who will have to fight in the cause of God. Therefore, recite and convey as much of the Qur’an as may be easy for all. You have to establish the Divine System and set up the Just Economic Order. And lend to God a goodly loan. Whatever good you send forth for your own ‘self’ you will find with God, better and more excellent in reward. And seek the protection of forgiveness of God for imperfections. Certainly, God is Forgiving, Merciful.
8:64 O Prophet! God is Sufficient for you and the believers who follow you.
8:74 Those who believed and emigrated, and strove in the cause of God, and those who hosted them and supported them, are True believers. For them is protection of forgiveness and honorable provision.[Mu'minoona Haqqa]
Muafiqeen had been sorted out during the life time of Rasullah (S).
3:179 God will not leave the believers as you are, until He distinguishes what is evil from what is good. But God will not let you know the secrets of the Unseen. God chooses His Messengers to receive knowledge of the Unseen as He wills. So, believe in God and His Messengers. If you believe and do right, yours will be a great reward. [The believers will stand out not only in their convictions but also in their decent manners of life and the hypocrites will no longer remain hidden. 47:29-30, 72:26-27]
Muafiqeen had been sorted out: How?
47:29 Or do the hypocrites think that God will not reveal their malice?
47:30 Had We so willed, We could have pointed them out to you and you would have identified them by their faces. But you will recognize them by the tone of their speech. And God knows all that you do. [9:64]