Sahih al-Bukhari 4491
صحيح البخاري#4491SahihNarrated Ibn `Umar:While some people were offering Fajr prayer at Quba' (mosque), some-one came to them and said, "Tonight some Qur'anic Verses have been revealed to the Prophet (ﷺ) and he has been ordered to face the Ka`ba (at Mecca) (during prayers), so you too should turn your faces towards it." At that time their faces were towards Sham (Jerusalem) so they turned towards the Ka`ba (at Mecca)
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 65:18