Imam al-Sadiq said: “[Imam] Hussain bin Ali approached his companions and said, ‘O People! Allah, exalted be His remembrance, has only created worshippers so that they [can] know Him (ya’rifu); and when they know Him, they worship Him; and when they [correctly] worship Him, they become free of worshipping anything else besides Him.’ A man then asked him [Hussain]: ‘O son of the Prophet! May my parents be your ransom, what is meant by knowing [having ma’rifa of] Allah?’ He [Hussain] replied, ‘It is that the people of all times must know [have ma’rifa of] their Imam to whom obedience is mandatory.’

الإمام الصّادق (عَلَيهِ الّسَلامُ) : خَرجَ الحسينُ بنُ عَليٍ على أصحابِهِ فَقالَ : أيّها النّاسُ ، إنّ اللّه‏َ ـ عزّ وجلّ ذِكْرُهُ ـ ما خَلقَ العِبادَ إلّا لِيَعرِفوهُ ، فإذا عَرفُوهُ عَبَدوهُ ، فإذا عَبَدوهُ اسْتَغنَوا بعِبادتِهِ عن عبادةِ ما سِواهُ . فقالَ لَه رجلٌ : يابنَ رسولِ اللّه‏ِ ، بأبي أنتَ واُمّي فما معرفةُ اللّه‏ِ؟ قالَ : معرفةُ أهلِ كلِّ زمانٍ إمامَهُمُ الّذي يَجبُ علَيهِم طاعتُهُ.

Sources

Mizan al-Hikma, hadith 2546; Bihar al-Anwar, vol. 23, pg. 83, hadith 22.