diff --git a/app/src/main/java/com/web3auth/app/MainActivity.kt b/app/src/main/java/com/web3auth/app/MainActivity.kt index 261e869..0d67cff 100644 --- a/app/src/main/java/com/web3auth/app/MainActivity.kt +++ b/app/src/main/java/com/web3auth/app/MainActivity.kt @@ -52,7 +52,11 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener { extraLoginOptions = ExtraLoginOptions(login_hint = hintEmail) } val loginCompletableFuture: CompletableFuture = web3Auth.login( - LoginParams(selectedLoginProvider, extraLoginOptions = extraLoginOptions) + LoginParams( + selectedLoginProvider, + extraLoginOptions = extraLoginOptions, + mfaLevel = MFALevel.OPTIONAL + ) ) loginCompletableFuture.whenComplete { _, error -> if (error == null) { @@ -130,7 +134,8 @@ class MainActivity : AppCompatActivity(), AdapterView.OnItemClickListener { "loginConfig" to LoginConfigItem( "torus", typeOfLogin = TypeOfLogin.GOOGLE, - name = "" + name = "", + clientId = "" ) ) ) diff --git a/core/src/main/java/com/web3auth/core/Web3Auth.kt b/core/src/main/java/com/web3auth/core/Web3Auth.kt index e25e60d..79aa459 100644 --- a/core/src/main/java/com/web3auth/core/Web3Auth.kt +++ b/core/src/main/java/com/web3auth/core/Web3Auth.kt @@ -44,11 +44,18 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) { gson.toJson(web3AuthOption.loginConfig) if (web3AuthOption.buildEnv != null) initOptions["buildEnv"] = web3AuthOption.buildEnv.toString().lowercase() + if (web3AuthOption.mfaSettings != null) initOptions["mfaSettings"] = + gson.toJson(web3AuthOption.mfaSettings) + if (params?.sessionTime != null) initOptions["sessionTime"] = + params.sessionTime.toString() val initParams = mutableMapOf( "loginProvider" to params?.loginProvider, "extraLoginOptions" to params?.extraLoginOptions, - "redirectUrl" to if (params?.redirectUrl != null) params.redirectUrl.toString() else initOptions["redirectUrl"].toString() + "redirectUrl" to if (params?.redirectUrl != null) params.redirectUrl.toString() else initOptions["redirectUrl"].toString(), + "mfaLevel" to params?.mfaLevel, + "curve" to params?.curve, + "dappShare" to params?.dappShare ) val paramMap = mapOf(