Al-Kāfi - Volume 3 > The Time of Salah (Prayer) In a Cloudy Day, Windy and One Who Has Performed Salah (Prayer) Without Facing the Direction of Qiblah
Hadith #3

3ـ الْحُسَيْنُ بْنُ مُحَمَّدٍ عَنْ عَبْدِ الله عَامِرٍ عَنْ عَلِيِّ بْنِ مَهْزِيَارَ عَنْ فَضَالَةَ بْنِ أَيُّوبَ عَنْ عَبْدِ الرَّحْمَنِ بْنِ أَبِي عَبْدِ الله عَنْ أَبِي عَبْدِ الله (عَلَيْهِ الْسَّلام) قَالَ إِذَا صَلَّيْتَ وَأَنْتَ عَلَى غَيْرِ الْقِبْلَةِ فَاسْتَبَانَ لَكَ أَنَّكَ صَلَّيْتَ عَلَى غَيْرِ الْقِبْلَةِ وَأَنْتَ فِي وَقْتٍ فَأَعِدْ فَإِنْ فَاتَكَ الْوَقْتُ فَلاَ تُعِدْ.

3. Al-Husayn ibn Muhammad has narrated from ‘Abd Allah ibn ‘Amir, from Ali ibn Mahziyar from Fadalah ibn Ayyub, from ‘Abd al- Rahman ibn abu ‘Abd Allah who has said the following: “Abu ‘Abd Allah, ‘Alayhi al-Salam, has said, ‘You may perform a Salah (prayer) without facing al- Qiblah (al-Ka‘bah). You must perform it again, only if you realize it in time. If the time is gone, it is not obligatory for you to perform it again.’”