Hadith 5018
أَخْبَرَنَا يُوسُفُ بْنُ عِيسَى قَالَ أَنْبَأَنَا الْفَضْلُ بْنُ مُوسَى قَالَ أَنْبَأَنَا الْأَعْمَشُ عَنْ عَدِيٍّ عَنْ زِرٍّ قَالَ قَالَ عَلِيٌّ إِنَّهُ لَعَهْدُ النَّبِيِّ الْأُمِّيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِلَيَّ أَنَّهُ لَا يُحِبُّكَ إِلَّا مُؤْمِنٌ وَلَا يَبْغُضُكَ إِلَّا مُنَافِقٌ
It was narrated that Zirr said:'Ali said: "The Unlettered Prophet [SAW] made a covenant with me, that none but a believer would love me, and none but a hypocrite would hate me
Sahih (Abu Ghuddah)
Sunan an-Nasaʾi 5018 · Book 47, Hadith 34