Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates: By Allah, in the time of the Prophet (peace and blessings be upon him) we did not recognise the hypocrites among us except by their hatred of Sayyiduna Ali (may Allah be pleased with him).
Al-Tabarani recorded this narration in al-Mu'jam al-Awsat, and al-Bazzar recorded a similar narration, except that his wording is: "We, the people of the Ansar, did not recognise our hypocrites except in this way." All of its chains are da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب المناقب / 14759