Skip to content

Commit df6e13d

Browse files
committed
feat: isMfaEnabled check added
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 73b3898 commit df6e13d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/Plugins/Web3AuthSDK/Web3Auth.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ public void logout(Uri redirectUrl = null, string appState = null)
443443

444444
public void enableMFA(LoginParams loginParams)
445445
{
446+
if(web3AuthResponse.userInfo.isMfaEnabled == true)
447+
{
448+
throw new Exception("MFA is already enabled for this user.");
449+
}
446450
string sessionId = KeyStoreManagerUtils.getPreferencesData(KeyStoreManagerUtils.SESSION_ID);
447451
if (!string.IsNullOrEmpty(sessionId))
448452
{

0 commit comments

Comments
 (0)