I was sitting with the Messenger of Allah ﷺ when a man passed by, and a man among the group said, "Messenger of Allah, I truly love this man."The Prophet ﷺ asked, "Have you let him know?"He replied, "No."The Prophet ﷺ said, "Get up and tell him."So he stood up, went to him, and said, "By Allah, I love you for the sake of Allah."The other man replied, "May the One for whose sake you love me love you in return."
حدثنا زيد بن الحباب حدثنا حسين بن واقد حدثني ثابت البناني
كنت جالسا عند رسول الله ﷺ إذ مر رجل فقال رجل من القوم يا رسول الله إني لأحب هذا الرجل قال هل أعلمته ذلك قال لا فقال قم فأعلمه قال فقام إليه فقال يا هذا والله إني لأحبك في الله قال أحبك الذي أحببتني له
Its isnad is sahih. The hadith was narrated by Abu Dawud, 4/332, no. 5124, in the Book of Manners (a man informing another man of his love for him), and Haythami, 10/282, attributed it to Tabarani and graded it sahih, and Ibn Hibban, 622, no. 2512, in Mawarid, and Hakim, 4/171, graded it sahih and Dhahabi agreed with him.