One of the important disciplines of the niyah, which is of the important parts of all worships and of the general and comprehensive instructions, is "sincerity". Its nature is purging the act of worship from the impurity of doing it for other than Allah, and clearing the heart from discerning anything other than Allah, the Exalted, in all formal, intellectual, external and internal acts. It achieves its perfection by absolutely neglecting the other [than Allah], and decisively pounding upon I-ness, selfishness, the other and the otherness. Allah, the Exalted, says: "Surely Allah's is the pure religion."  So, if the religion was mixed with any selfish and Satanic desires, it would not be pure; and that which is not pure is not acceptable to Allah, and that which has a blemish of otherness and selfishness is outside the limits of Allah's religion.
Allah, the Exalted, says: "And they were not enjoined except that they should worship Allah, making the religion His sincerely." 
And He also says:" ... And whoever desires the tillage of this world, We give him thereof, but in the Hereafter he will have no portion." 
It has been narrated that the Messenger of Allah (SA) said: "Every person gets according to his intention. So, the one whose intention is to migrate to Allah and His Messenger, his migration will be to Allah and His Messenger; and the one whose intention of migration is to attain to this world [to get something of it] or to marry a woman, his migration is to what he has intended." 
Allah, the Exalted, says: "And whoever leaves his house migrating to Allah and His Messenger, and then death overtakes him, his reward is, indeed, with Allah."  Maybe this noble ayah covers all degrees of sincerity: One is the formal migration of the body. If this migration was not purely for the sake of Allah and His Messenger, but was for the sake of personal desires, then it would not be a migration to Allah and His Messenger. This is. the formal juristic degree of sincerity.
Another one is the spiritual migration, and internal journey, which starts from the dark house of the self, with its goal being Allah and His Messenger. It, after all, returns to Allah Himself, because the Messenger, as a messenger, has no independence of his own; rather, he is an ayah, a mirror and a representative. So, to migrate to him means migrating to Allah: "The love of Allah's close friends is loving Allah."
So, the gist of the meaning of the noble ayah, based on this possibility, is that the one who leaves the house of the self, and gets out of the mansion of selfishness, on a spiritual migration and a gnostic cordial journey to Allah, disregarding his self, dignity and prestige, his reward will be with Allah. But if the salik to Allah demands, in his suluk to Allah, a personal desire , such as attaining stations, or even attaining to Allah's proximity for himself, this suluk will not be to Allah. Actually, the salik has not even got out of his self; that is, his journey is inside his own house, roaming from side to side and from corner to corner.
Therefore, if the journey is within the limits of the self [nafs] for the sake of attaining to self perfections, it will not be a journey to Allah, it is, in fact a journey from self to self. Nevertheless, the salik in his journey to Allah, will, inevitably, experience this kind of travel. No one, except the perfect walis [friends of Allah] (AS), can commence his divine journey without a journey within himself, as that exclusively belongs to the perfect ones (AS). Perhaps the noble ayah: "Peace it is till the break of the dawn,"  is a hint at this safety from the Satanic and selfish conducts during all the stages of the journey in the dark nights of nature, which is the night of Qadr in respect of the perfect ones, till the dawn of the Resurrection Day, which means, to the perfect ones, seeing the Beauty of the One. But the others would not be safe in all the stages of the journey. As a matter of fact, no salik would be free from Satan's intrusions in the early stages.
So, it has become clear that this degree of sincerity-whose first stage in the journey to Allah is safety, till its last, which is the attainment of real death, or rather till after the second real life, which is the "sobriety [sahw] after the self-effacement [mahw]-would not happen to the people of suluk and the common people of gnosticism and of austerity. The sign of this kind of sincerity is that Satan's temptation will have no way into those possessing it, and Satan's covetous eye will turn in complete despair away from them, as is said by Satan in the Qur'an: "By Your Might I will tempt them all, except Your sincere servants from among them."  Here, sincerity is ascribed to the servant himself, not to his act, which is a state loftier than sincerity in act. Perhaps the well-known noble hadith of the Prophet (SA) who said: "The one who keeps being sincere to Allah for forty mornings, fountains of wisdom will flow from his heart to his tongue,"  refers to all the degrees of sincerity, i.e. sincerity of act, of attribute and of essence, and probably it appears in sincerity of essence, for which the other degrees of sincerity are requisites.
To explain this noble hadith, and to state what is meant by "fountains of wisdom", the way they flow from the heart to the tongue, the effect of sincerity in this flowing and the significance of "forty mornings", are out of the scope of this thesis, as they need a separate book. The thesis titled Tuhfatul Muluk fis-Sayr-i was-Suluk, ascribed to The knower of Allah , the late Bahrul `Ulum, is mostly concerned with the explanation of this noble hadith. It is a nice thesis, though somewhat arguable. For this reason some say that it was not written by the said great personality, which is quite possible.
. Surah az-Zumar: 3.
. Surah al-Bayyinah: 5.
. Surah Shura: 20.
. Mustadrakul Wasa'il, chs. on "Preliminaries to the Acts of Worship", ch. 5, hadith 5.
. Surah an-Nisa': 100.
. Surah al-Qadr: 5.
. Surah Sad: 82 and 83.
. Biharul Anwar, vol. 67, p. 242, "Book of Faith and Disbelief', ch. on "Sincerity", hadith No. 10., quoting `Uyunu Akhbarir-Rida, vol. 2, p. 69, with a slight difference. The same content is stated in the latter source, p. 249, hadith 25.