Praying in a white thobe with no pants underneath
Question

Does wearing a white thobe with no pants underneath show the ‘awrah? What is the ruling on one who prays behind the imam who is in this state, and he knows that it is essential to cover the ‘awrah when praying. Please note that he experiences a great deal of waswaas and he prays behind the imam wearing a white thobe without wearing long pants, and he says that this may be waswaas. If he has to repeat the prayer, then what should he do if he does not remember how many prayers he did in this state?.
Praise be to Allah.One of the conditions of prayer being valid, without which it is invalid, is covering the ‘awrah. The basic principle concerning that is the words of Allah (interpretation of the meaning): 
“O Children of Adam! Take your adornment (by wearing your clean clothes) while praying” [al-A’raaf 7:31]
i.e., cover your ‘awrah for all prayers, obligatory and naafil, for covering it is an adornment of the body just as uncovering it makes the body ugly.  
It may be that what is meant by adornment here is something more than that, namely clean and beautiful clothes. So this command to cover the ‘awrah when praying includes choosing beautiful clothes and cleaning the ‘awrah from dirt and impurities.  
In order for the garment to be covering, it must conceal the colour of the skin; if the colour of the skin shows from beneath it then it is not regarded as covering.
 Ibn Qudamah said in al-Mughni (1/337): 
What is required is to cover with something that conceals the colour of the skin. If it is thin and the colour of the skin can be seen beneath it, and it can be seen whether it is white or red, then it is not permissible to pray in it, because covering is not achieved by that. End quote. 
Al-Nawawi said in al-Majmoo’ (3/176): 
Our companions said: it is essential to cover with something that prevents anyone from seeing the colour of the skin. It is not sufficient to wear a thin garment through which it may be seen whether the skin is black or white. End quote. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in al-Sharh al-Mumti’ (2/148): 
If what is worn on the body clearly shows the colour of the skin, then this is not covering, but if it only shows where the undergarment stops then this does cover. End quote. 
The white thobes that people wear nowadays vary according to the type of fabric. Some of them cover the colour of the skin and some of them are thin and the colour can be seen through them. The guideline with regard to covering is that if a person looking at the wearer cannot distinguish the colour of his skin, whether it is white or red or black, then the thobe is covering and is acceptable, and there is nothing wrong with praying in it even if one does not wear long pants under it. 
But if a person can distinguish the colour of the wearer’s skin, then this thobe is too thin and is not regarded as covering, so it is not valid to pray in it. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked in Majmoo’ al-Fataawa (12/question no. 167) about the ruling on praying in a thin white thobe, with shorts under it which only cover a small part of the thigh, and the skin can be seen clearly through it. 
He replied: 
If a man wears shorts that do not cover the area between the navel and the knees, and he wears over them a thin thobe, then in fact he is not covering his ‘awrah, because covering means that the colour of the skin should not be visible through the garment. Allah says (interpretation of the meaning):  
“O Children of Adam! Take your adornment (by wearing your clean clothes) while praying”
[al-A’raaf 7:31]
And the Prophet (peace and blessings of Allah be upon him) said: “If the garment is large enough, wrap it around the body (covering the shoulders) and if it is tight (too short), then use it as an izaar (tie it around your waist only).” 
The scholars are unanimously agreed that if a person prays naked when he is able to cover his ‘awrah then his prayer is invalid. 
Those whom Allah has blessed with these clothes should wear pants that cover the area between the navel and the knee, or they should wear a thick thobe that does not show the ‘awrah, so that they will be obeying the command of Allah (interpretation of the meaning): 
“O Children of Adam! Take your adornment (by wearing your clean clothes) while praying”
[al-A’raaf 7:31]
End quote. 
He also said in the answer to question no. 168: 
What some people do in the summer, wearing a light thobe with short pants beneath it that do not reach the knees, is haraam and it is not permissible to pray in these clothes, because one of the conditions of prayer being valid is that a person must cover the area between his navel and his knees. If the pants are short they do not cover the area between the navel and the knees. The colour of the skin may be seen through a light thobe, so in that case he is not covering the ‘awrah that he is obliged to cover. If he offers any prayers like that, then his prayers are invalid. Based on this, our brothers should either change the shorts and put on long pants that cover the area between the navel and the knees, or they should wear a thick thobe that does not show the colour of the skin. And Allah is the source of strength. End quote. 
See also the answer to question no. 5809. 
And Allah knows best.