Ali said to the Prophet ﷺ, "Messenger of Allah, if a son is born to me after your passing, may I name him with your name and give him your kunya?"He replied, "Yes."Sumayy said, "Abu Bakr did not say, 'I said.' He said, 'Ali said.'"
حدثنا عثمان وأبو بكر ابنا أبي شيبة قالا حدثنا أبو أسامة عن فطر عن منذر عن محمد
يا رسول الله إن ولد لي من بعدك ولد أسميه باسمك وأكنيه بكنيتك قال نعم ولم يقل أبو بكر قلت قال قال علي عليه السلام للنبي ﷺ
Its isnad is hasan. Tirmidhi transmitted it in the Book of Manners, chapter on the dislike of combining the Prophet's ﷺ name and his kunya, no. 2843, from the hadith of Fitr through this route, and he said, "Hasan sahih." It is also in Musannaf Ibn Abu Shayba, 8/480.