here is a narration from al-kafi

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

Imam (a.s.w.s) says: when Allah wanted to create creation, He first created sweet water, and soar water. and then He mixed them. and then He mixed the soil which was made on it. and from that, creatures originated which got to the right and to the left. so He told those to the right to go to heaven with peace. and He told the ones on the left, to go to hell as He does not care for them. then He asked them: am I not your Lord? they replied: yes. this testimony was so that they dont say on day of qayamat that they were not aware.
then He took oath from Prophets (a.s.w.s) that am I not your Lord and Mohammad (a.s.w.s) your Prophet and Ali (a.s.w.s) your Amir-ul-momineen?
they said: yes
with this, their Prophethood was testified
and then He took oath from those Prophets who had strength (ool-ul-azm) that He is the Lord, Mohammad (a.s.w.s) is the Prophet, Ali (a.s.w.s) is the Amir-ul-momineen and the Ausia (a.s.w.s) who would come, they are the owners of His amr and treasurers of His knowledge. and Mehdi (a.s.w.s) , and that they are the helpers of his religion and they would show my state/power. and I will take the revenge from those who are my enemies. and they would obey me if they like it or not.
they said: we accept and we testify o Lord!
but Adam neither accepted nor rejected. so azm/strength was proven for 5 of them regarding Mehdi (a.s.w.s) . and Adam (a.s.w.s) did not get azm/strength regarding him. and so Allah said:- “we took oath from Adam (a.s.w.s) , but he forgot and we did not find azm in him”.
Imam (a.s.w.s) said: here it means left.
then Allah ordered fire so it lit up
so He told people on left to enter, but they did not
then He told people on right to enter, they entered. and fire got cooled and peaceful
so people on left said: forgive us
He said: forgiven, but now enter
but they did not
from here, obedience, wilayat and disobedience are proven


1-al-kafi, vol 2, page 8

2-al-kafi, urdu version, baab 131, vol 3, page 212, narration 1


Sheikh Hadi Najafi says about this narration

الرواية صحيحة الإسناد.

narration is sahih/authentic in chain

[Mosaat ahadeeth ahlubait, Sheikh Hadi Najafi, vol 1, page 454-455]