Anas bin Malik reported,

The Prophet ﷺ came out when the sun had passed its zenith and led the noon prayer. After giving the closing salutation, he stood upon the pulpit and mentioned the Hour, mentioning that great events would precede it. Then he said, "Whoever wishes to ask about anything, let him ask. By Allah, you will not ask me about anything while I stand in this place except that I will inform you of it."Anas said, "The people wept much, and the Messenger of Allah ﷺ kept saying, 'Ask me.'"Anas continued, "A man stood up and asked, 'Where will I enter, Messenger of Allah?'"He replied, "The Fire."Then Abdullah bin Huzafa stood up and asked, "Who is my father, Messenger of Allah?"He answered, "Your father is Huzafa."He kept repeating, "Ask me, ask me."Then Umar fell upon his knees and said, "We are content with Allah as Lord, with Islam as religion, and with Muhammad ﷺ as Messenger."The Messenger of Allah ﷺ fell silent when Umar said that. Then the Messenger of Allah ﷺ said, "By the One in whose hand is my soul, Paradise and the Fire were just now displayed to me along the face of this wall while I was praying. I have never seen the like of this day in good and in evil."

Azami 16522

Sahih

عن أنس بن مالك

أن النبي ﷺ خرج حين زاغت الشمس، فصلى الظهر، فلما سلم، قام على المنبر، فذكر الساعة، وذكر أن بين يديها أمورا عظاما، ثم قال: من أحب أن يسأل عن شيء فليسأل عنه، فوالله لا تسألوني عن شيء إلا أخبرتكم به ما دمت في مقامي هذا قال أنس: فأكثر الناس البكاء، وأكثر رسول الله ﷺ أن يقول: سلوني فقال أنس: فقام إليه رجل: فقال: أين مدخلي يا رسول الله؟ قال: النار، فقام عبد الله بن حذافة، فقال: من أبي يا رسول الله؟ قال: أبوك حذافة، قال: ثم أكثر أن يقول: سلوني سلوني، فبرك عمر على ركبتيه، فقال: رضينا بالله ربا، وبالإسلام دينا، وبمحمد ﷺ رسولا، قال: فسكت رسول الله ﷺ حين قال عمر ذلك، ثم رسول الله ﷺ: والذي نفسي بيده لقد عرضت علي الجنة والنار آنفا في عرض هذا الحائط وأنا أصلي، فلم أر كاليوم في الخير والشر.

الأعظمي 16522صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Description of Paradise and Hell and their inhabitants
Chapter
Description of Paradise and Hell together
Section
Display of Paradise and Hell to the Prophet ﷺ and his seeing what is in them of good and evil
Numbering
Jami al-Kamil 16522 (2nd edition)
Azami 16522