Sayyed Muhammad Husaini Ragheb, Sayyed Muhammad Husaini Ragheb has a BA in Law from Guilan University, Iran and has also undertaken Hawzah studies in Qom. He is a Cultural Affairs director of Ethics Group of Al-Mustafa Open... Answered 1 year ago

The legal(Shar'ee) oath only and merely takes place by the name of Allah or His attributes like Al-Ali , Al-Azim , Ar-Rahman...
So if someone made an oath like: "I swear to Allah that I won't commit this sin" the legal oath takes place and he has to be committed to the consequences and that is the Kaffarah if he breaks his oath.