Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
If someone swears by Allah without intending to take an actual oath, and without the firm resolve to bind themselves to it, then there is no sin or expiation (Kaffarah) required of them. Allah the Exalted says {what means}: 'God will not call you to account for thoughtlessness in your oaths, but for the intention in your hearts; and He is Oft-forgiving, Most Forbearing.' [Al-Baqarah/225]. However, a Muslim should avoid swearing oaths excessively so that their tongue does not become accustomed to it. Allah the Exalted says {what means}: 'And make not God’s (name) an excuse in your oaths against doing good, or acting rightly, or making peace between persons; for God is One Who heareth and knoweth all things.
' [Al-Baqarah/224]. And Allah the Exalted knows best."