The Messenger of Allah ﷺ used to say frequently, "Turner of hearts, keep my heart firm upon your religion."His companions and family said to him, "Messenger of Allah, do you fear for us when we have already believed in you and in what you brought?"He replied, "Hearts are in the hand of Allah . He turns them as He wills."
حدثنا عفان حدثنا عبد الواحد حدثنا سليمان بن مهران عن أبي سفيان
كان رسول الله ﷺ يكثر أن يقول يا مقلب القلوب ثبت قلبي على دينك فقال له أصحابه وأهله يا رسول الله أتخاف علينا وقد آمنا بك وبما جئت به قال إن القلوب بيد الله عز وجل يقلبها
Its isnad is sahih. Sulayman bin Mihran is the imam Amash, and Abu Sufyan is Talha bin Nafi. Bukhari related something similar to it, 13/377, no. 7391 (Fath), in the Book of Monotheism, Chapter on the Turner of Hearts, as did Muslim, 2045, in the Book of Divine Decree, and Ibn Abu Shayba, 10/36.