Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:4:81

And they say, "˹We pledge˺ obedience." But when they leave you, a group of them spend the night determining to do other than what you say. But Allah records what they plan by night. So leave them alone and rely upon Allah. And sufficient is Allah as Disposer of affairs.  

They say, that is, the hypocrites ˹say˺ when they come to you, ‘Our affair is ˹all about˺ Obedience, to you’; but when they sally forth, ˹when˺ they depart, from you, a party of them harbour (the ˹final˺ tā’ ˹of the feminine-ending in bayyatat, ‘harbour’˺ can either be elided with the following tā’ ˹of tā’ifa, ‘a party’˺ or simply omitted) they entertain secretly ˹feelings˺, other than what they say, to you in your presence in the way of ˹their˺ obedience, in other words, ˹they hide˺ disobedience to you. God writes down, He commands that it be written, what they harbour, in their scrolls ˹of deeds˺, so that they will be requited for it. So turn away from them, in forgiveness, rely on God, put your trust in Him, for He will suffice you; and God suffices as a Guardian, to Whom matters are entrusted.
القرآن:٤:٨١

وَيَقُولُونَ طَاعَةٌ فَإِذَا بَرَزُوا مِنْ عِنْدِكَ بَيَّتَ طَائِفَةٌ مِنْهُمْ غَيْرَ الَّذِي تَقُولُ ۖ وَاللَّهُ يَكْتُبُ مَا يُبَيِّتُونَ ۖ فَأَعْرِضْ عَنْهُمْ وَتَوَكَّلْ عَلَى اللَّهِ ۚ وَكَفَىٰ بِاللَّهِ وَكِيلًا  

{ويقولون} أي المنافقون إذا جاءوك أمرنا {طاعةٌ} لك {فإذا برزوا} خرجوا {من عندك بيَّت طائفة منهم} بإدغام التاء في الطاء وتركه أي أضمرت {غير الذي تقول} لك في حضورك من الطاعة أي عصيانك {والله يكتب} يأمر بكتب {ما يبيِّتون} في صحائفهم ليجازوا عليه {فأعرض عنهم} بالصفح {وتوكل على الله} ثق به فانه كافيك {وكفى بالله وكيلا} مفوضا إليه.