The hypocrites were recognized by the first or second year of Islam’s emergence and all verses revealed afterwards support the Muhajerin (immigrants) and the Ansar (assisters) altogether.
Shias have falsely been accused of disrespecting/discrediting the Sahabah while such a claim isn't true. Shias have always followed the Ahlul-Bayt in respecting the Sahabah. Nevertheless, Shias do believe that not all of them can be considered righteous because first of all according to the Quran the Sahabah were of different levels of righteousness, for the Quran has stated that amongst them, there were liars, hypocrites, sinners, the ones who didn’t agree with the prophet regarding jihad, those who were too sluggish to go to war and those who didn’t prefer to go out to war (a group of believers that disliked going out to confront the enemy and were sluggish in executing this task) and those who truly didn’t believe in Muhammad (pbuh) as a prophet. History clearly reflects that some Sahabah had even committed adultery like Mughayrah and Walid in addition to some of the Mareqin, Nakesin and Qasetin (the three groups that rioted against Imam Ali during his reign and went to war against him).
Therefore it is easy for one to conclude that the Shia believe that not all of the Sahabah were righteous not that being among the Sahabah means to be a hypocrite. You can refer to the following questions for further explanation regarding this matter: 2929 (website: 3188), 2799 (website: 3502), 2800 (website: 3553), 2809 (website: 3815) and 3023 (website: 3422).
It should be noted that what has been assumed as correct and serves as the grounds for the argument the question you have asked presents is also incorrect because:
1- Towards the end of his lifetime, the prophet (pbuh) had repeatedly shown his fear of those around him and surely this fear was not of the disbelievers.
2- It was claimed that the hypocrites were known by the end of one or two years after Islam's emergence, but there are verses that tell us that there were hypocrites that remained unrecognized by the Muslims even after the first two years of Islam.
Although we have written about the standpoint of the Shia regarding the Sahabah and explained it thoroughly on this website, nevertheless, we intend to shed some light on a few points that can be found in the question above:
1-Shias have been falsely accused of disrespecting and discrediting the Sahabah which isn't true; the Shia have always followed the path of the Ahlul-Bayt in respecting them, this saying of Imam Ali being good confirmation of such a claim: “I have seen the companions of the Prophet but I do not find anyone resembling them. They began the day with dust on the hair and face (in hardship of life) and passed the night in prostration and standing in prayers. Sometimes they put down their foreheads and sometimes their cheeks. With the recollection of their resurrection it seemed as though they stood on live coal. It seemed that in between their eyes there were signs like knees of goats, resulting from long prostrations. When Allah was mentioned their eyes flowed freely till their shirt collars were drenched. They trembled for fear of punishment and hope of reward as the tree trembles on the day of stormy wind.[1]
2- As for what you said about Quranic verses, the Quran says:
a) “وَ مِمَّنْ حَوْلَکُمْ مِنَ الْأَعْرابِ مُنافِقُونَ وَ مِنْ أَهْلِ الْمَدِینَةِ مَرَدُوا عَلَى النِّفاقِ لا تَعْلَمُهُمْ نَحْنُ نَعْلَمُهُمْ سَنُعَذِّبُهُمْ مَرَّتَیْنِ ثُمَّ یُرَدُّونَ إِلى عَذابٍ عَظِیمٍ”[2]
b) “وَ ما مُحَمَّدٌ إِلَّا رَسُولٌ قَدْ خَلَتْ مِنْ قَبْلِهِ الرُّسُلُ أَ فَإِنْ ماتَ أَوْ قُتِلَ انْقَلَبْتُمْ عَلى أَعْقابِکُمْ وَ مَنْ یَنْقَلِبْ عَلى عَقِبَیْهِ فَلَنْ یَضُرَّ اللَّهَ شَیْئاً وَ سَیَجْزِی اللَّهُ الشَّاکِرِینَ”[3]
c) “وَ یَحْلِفُونَ بِاللَّهِ إِنَّهُمْ لَمِنْکُمْ وَ ما هُمْ مِنْکُمْ وَ لکِنَّهُمْ قَوْمٌ یَفْرَقُونَ”[4]
d) “لَقَدْ کانُوا عاهَدُوا اللَّهَ مِنْ قَبْلُ لا یُوَلُّونَ الْأَدْبارَ وَ کانَ عَهْدُ اللَّهِ مَسْؤُلًا”[5]
e) “عَفَا اللَّهُ عَنْکَ لِمَ أَذِنْتَ لَهُمْ حَتَّى یَتَبَیَّنَ لَکَ الَّذِینَ صَدَقُوا وَ تَعْلَمَ الْکاذِبِینَ”[6]
f) “. لَمْ تَرَ إِلَى الَّذِینَ قِیلَ لَهُمْ کُفُّوا أَیْدِیَکُمْ وَ أَقِیمُوا الصَّلاةَ وَ آتُوا الزَّکاةَ فَلَمَّا کُتِبَ عَلَیْهِمُ الْقِتالُ إِذا فَرِیقٌ مِنْهُمْ یَخْشَوْنَ النَّاسَ کَخَشْیَةِ اللَّهِ أَوْ أَشَدَّ خَشْیَةً وَ قالُوا رَبَّنا لِمَ کَتَبْتَ عَلَیْنَا الْقِتالَ لَوْ لا أَخَّرْتَنا إِلى أَجَلٍ قَرِیبٍ”[7]
g) “کَما أَخْرَجَکَ رَبُّکَ مِنْ بَیْتِکَ بِالْحَقِّ وَ إِنَّ فَرِیقاً مِنَ الْمُؤْمِنِینَ لَکارِهُونَ یُجادِلُونَکَ فِی الْحَقِّ بَعْدَ ما تَبَیَّنَ کَأَنَّما یُساقُونَ إِلَى الْمَوْتِ وَ هُمْ یَنْظُرُونَ وَ إِذْ یَعِدُکُمُ اللَّهُ إِحْدَى الطَّائِفَتَیْنِ أَنَّها لَکُمْ وَ تَوَدُّونَ أَنَّ غَیْرَ ذاتِ الشَّوْکَةِ تَکُونُ لَکُمْ وَ یُرِیدُ اللَّهُ أَنْ یُحِقَّ الْحَقَّ بِکَلِماتِهِ وَ یَقْطَعَ دابِرَ الْکافِرِینَ لِیُحِقَّ الْحَقَّ وَ یُبْطِلَ الْباطِلَ وَ لَوْ کَرِهَ الْمُجْرِمُونَ”[8] So there was a group of believers who weren’t content with accompanying the prophet (pbuh) in jihad.
h) “وَ یَسْتَأْذِنُ فَرِیقٌ مِنْهُمُ النَّبِیَّ یَقُولُونَ إِنَّ بُیُوتَنا عَوْرَةٌ وَ ما هِیَ بِعَوْرَةٍ إِنْ یُرِیدُونَ إِلَّا فِرارا”[9]
i) “یا أَیُّهَا الَّذِینَ آمَنُوا ما لَکُمْ إِذا قِیلَ لَکُمُ انْفِرُوا فِی سَبِیلِ اللَّهِ اثَّاقَلْتُمْ إِلَى الْأَرْضِ أَ رَضِیتُمْ بِالْحَیاةِ الدُّنْیا مِنَ الْآخِرَةِ فَما مَتاعُ الْحَیاةِ الدُّنْیا فِی الْآخِرَةِ إِلَّا قَلِیلٌ”[10] This is while the verse is addressing those who don’t want to go to jihad with the phrase “یا ایها الذین آمنوا” which shows that it is the believers who are being addressed, not anyone else, we also know that Allah (swt) threatened those who wouldn’t go out for jihad and would bring excuses like the weather being too hot, with the phrase “قُلْ نارُ جَهَنَّمَ أَشَدُّ حَرًّا لَوْ کانُوا یَفْقَهُونَ”[11]
j) “وَ لَوْ أَرادُوا الْخُرُوجَ لَأَعَدُّوا لَهُ عُدَّةً وَ لکِنْ کَرِهَ اللَّهُ انْبِعاثَهُمْ فَثَبَّطَهُمْ وَ قِیلَ اقْعُدُوا مَعَ الْقاعِدِینَ لَوْ خَرَجُوا فِیکُمْ ما زادُوکُمْ إِلَّا خَبالًا وَ لَأَوْضَعُوا خِلالَکُمْ یَبْغُونَکُمُ الْفِتْنَةَ وَ فِیکُمْ سَمَّاعُونَ لَهُمْ”[12]
As can be seen, these verses apply to the followers and the Sahabah of the prophet more than anyone else. Therefore no one can claim that every individual who has seen the prophet even for a moment is considered righteous. The truth of the matter is that in order to justify the tyranny and corruption of the Umayyid dynasty, some have tried to use theories like these and say that as long as a person is of the Sahabah, he is righteous. But according to the Shia standpoint on the issue, according to the Quran not all the Sahabah were totally righteous, but were of different levels of righteousness, for the Quran has stated that there were liars, hypocrites, sinners, ones who didn’t agree with the prophet regarding jihad, those who were too sluggish to go to war, those who didn’t believe in the prophet (pbuh), and those who preferred not to go out to war (a group of believers that weren't pleased to go out and confront the enemy and were sluggish in executing this task) among the Sahabah[13], and as was said before, these verses address these believers with the phrase of “ یا ایها الذین آمنوا”.
It is also incorrect to categorize the prophet’s (pbuh) followers and Sahabah into only two categories; those who were completely righteous and total hypocrites, knowing that there may be many of them who were merely sinners and as we all know, one doesn’t become a hypocrite just by sinning. In other words, one must distinguish between the sinner and the hypocrite; there is a great difference between the two.
3- It was said that all hypocrites were known from the true believers by the end of the first or second year of Islam's advent and Muslims were able to distinguish between the true believers and hypocrites. First of all, hypocrisy isn't a temporary concept that ends easily; it may remain till the Day of Judgment and there might be hypocrites till then. Secondly, the prophet (pbuh) had shown his fear of those who were close and around him. There is a hadith in the books of our Sunni brothers that when the verse "بلغ ما أنزل إلیک من ربک" was revealed the prophet said: “What can I do knowing that I am alone and people will unite against me?!” Then this verse was revealed"وإن لم تفعل فما بلغت رسالته".[14]
Surely this fear was not of the disbelievers because there were none for the prophet (pbuh) to convey Allah's (swt) message to on the day of Ghadir on the tenth year after hijrah. If those around the prophet (pbuh) were actually devout companions of his, then what was the reason for him saying: «انما أنا واحد، کیف اصنع یجتمع علی الناس»؟[15] What reason would there be for him to be so afraid of the message not getting through to the people?
4-There are verses in the Quran such as: "وَ ما مُحَمَّدٌ إِلَّا رَسُولٌ قَدْ خَلَتْ مِنْ قَبْلِهِ الرُّسُلُ أَ فَإِنْ ماتَ أَوْ قُتِلَ انْقَلَبْتُمْ عَلى أَعْقابِکُمْ وَ مَنْ یَنْقَلِبْ عَلى عَقِبَیْهِ فَلَنْ یَضُرَّ اللَّهَ شَیْئاً وَ سَیَجْزِی اللَّهُ الشَّاکِرِینَ"[16] that not only show that not all the Sahabah were righteous but also that some had even denounced their faith.[17]
5- The inquirer must also note that the history of that time shows very clearly that some of the Sahabah like Mughayra and Walid[18] and others belonging to the Mareghin, Qasetin and Nakethin (the three groups that rioted against Imam Ali during his reign and went to battle against him) had committed adultery and murder.
It is on this basis that Shafe’i says that the testimony of 4 individuals isn't accepted and has no credit: Muawiya, Amr ibn Aas, Mughayra and Ziyad (because none were trustworthy and reliable).[19]
Another proof that confirms what we say is that even some of the Sahabah did not consider other Sahabah to be righteous and would sometimes even accuse them of being hypocrites.[20]
[1] "قَدْ رَأَیْتُ أَصْحَابَ مُحَمَّدٍ ص فَمَا أَرَى أَحَداً یُشْبِهُهُمْ مِنْکُمْ لَقَدْ کَانُوا یُصْبِحُونَ شُعْثاً غُبْراً وَ قَدْ بَاتُوا سُجَّداً وَ قِیَاماً یُرَاوِحُونَ بَیْنَ جِبَاهِهِمْ وَ خُدُودِهِمْ وَ یَقِفُونَ عَلَى مِثْلِ الْجَمْرِ مِنْ ذِکْرِ مَعَادِهِمْ کَأَنَّ بَیْنَ أَعْیُنِهِمْ رُکَبَ الْمِعْزَى مِنْ طُولِ سُجُودِهِمْ إِذَا ذُکِرَ اللَّهُ هَمَلَتْ أَعْیُنُهُمْ حَتَّى تَبُلَّ جُیُوبَهُمْ وَ مَادُوا کَمَا یَمِیدُ الشَّجَرُ یَوْمَ الرِّیحِ الْعَاصِفِ خَوْفاً مِنَ الْعِقَابِ وَ رَجَاءً لِلثَّوَابِ" Nahjul-Balaghah, sermon 97.
[2] “There are hypocrites among the Bedouins around you and among the townspeople of Madinah, steeped in hypocrisy. You do not know them; We know them, and We will punish them twice, then they shall be consigned to a great punishment” Tawbah:101.
[3] “Muhammad is but an apostle; [other] apostles have passed before him. If he dies or is slain, will you turn back on your heels? Anyone who turns back on his heels will not harm Allah in the least, and soon Allah will reward the grateful” Ale-Imran:144.
[4] “They swear by Allah that they belong to you, but they do not belong to you. Rather they are a frightened lot” Tawbah:56.
[5] “though they had certainly pledged to Allah before that they would not turn their backs] to flee [, and pledges given to Allah are accountable” Ahzab:15.
[6] “May Allah excuse you! Why did you grant them leave] to stay behind [before those who told the truth were evident to you and you had ascertained the liars” Tawbah:43.
[7] “Have you not regarded those who were told," Keep your hands off [from warfare], and maintain the prayer, and give the zakat"? But when fighting was prescribed for them, behold, a part of them were afraid of people as if fearing Allah, or were even more afraid, and they said, "Our Lord! Why did You prescribe fighting for us? Why did You not respite us for a short time?!" Nisa:77.
[8] “As your Lord brought you out from your home with a just cause, a part of the faithful were indeed reluctant. They disputed with you concerning the truth after it had become clear, as if they were being driven towards death as they looked on. When Allah promised you [victory over] one of the two companies, [saying]," It is for you," you were eager that it should be the one that was unarmed. But Allah desires to confirm the truth with His words, and to root out the faithless, so that He may confirm the truth and bring falsehood to naught, though the guilty should be averse” Anfal:5-8.
[9] “And when a group of them said," O people of Yathrib! [This is] not a place for you, so go back!" And a group of them sought the Prophet's permission, saying," Our homes lie exposed [to the enemy]," although they were not exposed. They only sought to flee” Ahzab:13.
[10] “O you who have faith! What is the matter with you that when you are told:" Go forth in the way of Allah," you sink heavily to the ground? Are you pleased with the life of this world instead of the Hereafter? But the wares of the life of this world compared with the Hereafter are but insignificant” Tawbah:38.
[11] “Those who were left behind exulted for their sitting back against [the command of] the Apostle of Allah, and were reluctant to wage jihad with their possessions and persons in the way of Allah, and they said," Do not go forth in this heat." Say, The fire of hell is severer in heat, should they understand” Tawbah:81.
[12] “Only those seek a leave [of exemption] from you who do not believe in Allah and the Last Day, and whose hearts are in doubt, so they waver in their doubt. Had they desired to go forth, they would have surely made some preparations for it; but Allah was averse to arouse them, so He held them back, and it was said [to them]," Be seated with those who sit back." Had they gone forth with you, they would have only added to your troubles, and they would have surely spread rumors in your midst, seeking to cause sedition among you. They have some spies among you, and Allah knows best the wrongdoers” Tawbah:45-47.
[13] See: Al-Alusi wal-Tashayyu’, pg. 69.
[14] حدثنی الحارث بن محمد قال، حدثنا عبد العزیز قال، حدثنا سفیان الثوری، عن رجل، عن مجاهد قال: لما نزلت:"بلغ ما أنزل إلیک من ربک"، قال: إنما أنا واحد، کیف أصنع؟ تجَمَّع علیّ الناس! فنزلت:"وإن لم تفعل فما بلغت رسالته"، الآیة Tafsir Tabari, vol. 10, pg. 468; أخرج أبو الشیخ عن الحسن أن رسول الله صلى الله علیه وسلم قال « إن الله بعثنی برسالة فضقت بها ذرعاً ، وعرفت أن الناس مکذبی ، فوعدنی لأبلغن أو لیعذبنی ، فأنزل { یا أیها الرسول بلِّغ ما أنزل إلیک من ربک } » . وأخرج عبد بن حمید وابن جریر وابن أبی حاتم وأبو الشیخ عن مجاهد قال : لما نزلت { بلغ ما أنزل إلیک من ربک } قال : یا رب ، إنما أنا واحد کیف أصنع لیجتمع علیّ الناس؟ ، فنزلت { وإن لم تفعل فما بلغت رسالته } Al-Durrul-Manthur, vol. 3, pg. 418. See: Software of Al-Maktabatul-Shamilah (المکتبة الشاملة).
[15] See: Abaqatul-Anwar fi Imamatil-A’immatil-At’har, vol. 9, pp. 228-230.
[16] “Muhammad is but an apostle; [other] apostles have passed before him. If he dies or is slain, will you turn back on your heels? Anyone who turns back on his heels will not harm Allah in the least, and soon Allah will reward the grateful” Ale-Imran:144.
[17] You can refer to the hadiths of the pool of Kawthar, Question 1589 (website: 1970) What is meant by the apostasy of the Sahabah and how it is proven.
[18] There are many historical records on the adultery of Mughayrah during the era of Jahiliyyah (before Islam), also, the story of his affair with Umm Jamilah is well-known, see: Futuhul-Buldan, 344; Tarikhul-Tabari, vol. 2, pp. 492-494; Al-Aghani, vol. 16, pp. 103-110; Al-Kamel fil-Tarikh, vol. 2, pp. 384-385; Al-Bidayah wal-Nihayah, vol. 7, pp. 66-67. As for Walid, the verse "ان جاءکم فاسق بنبا فتبینوا..." (Hujurat:6) has been revealed regarding him. See:Tafsir Tabari, vol. 11, pp. 383-384, hadiths 31686-31692; Tafsir Al-Baghawi, vol. 4, pg. 191; Al-Kashaf, vol. 3, pg. 559; Tafsir Al-Fakhr Al-Razi, vol. 28, pg. 120; Tafsir Ibn Kathir, vol. 4, pg. 210.
[19] “روى عن الشافعى رحمة اللَّه علیه انه اسرّ الى الربیع انه لا یقبل شهادة اربعة من الصحابة و هم معاویة و عمرو بن العاص و المغیرة و زیاد” Al-Mukhtasar fi Akhbaril-Bashar, vol. 1, pg. 186.
[20] Usayd ibn Khudhayr has been reported telling Sa’d ibn Abbadah: “کَذَبْتَ لَعَمْرُ اللَّهِ إِنَّکَ مُنَافِقٌ تُجَادِلُ عَنْ الْمُنَافِقِینَ” Sahih Bukhari, vol. 9, pg. 148.