Hi,
Getting “Invalid params for jwt login. Missing domain” when calling enableMFA() and tapping “continue with JWT”.
this.web3authInstance = new Web3Auth(WebBrowser, secureStoreWrapper, {
clientId: WEB3AUTH_CLIENT_ID,
network: (WEB3AUTH_NETWORK_ENV as any) || WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
redirectUrl: REDIRECT_URL, // matches app.json scheme
privateKeyProvider,
loginConfig: {
jwt: {
verifier: WEB3AUTH_VERIFIER,
verifierSubIdentifier: WEB3AUTH_SUB_VERIFIER,
typeOfLogin: 'jwt',
clientId: WEB3AUTH_CLIENT_ID,
},
},
useCoreKitKey:true,
enableLogging: true,
});
await this.web3authInstance.init();
await this.web3authInstance.login({
loginProvider: LOGIN_PROVIDER.JWT,
mfaLevel: 'optional',
extraLoginOptions: {
id_token: userJwtToken,
verifierIdField: 'sub',
domain: WEB3AUTH_DOMAIN, // <- tried also without this parameter
isUserIdCaseSensitive: false
},
curve: 'secp256k1',
dappShare: 'true',
});
await this.web3authInstance.enableMFA()
I also tried with this, but it seems to want to visit the domain for some reason in the WebView (web3auth webview opens the given domain):
// Call login AGAIN even if already logged in, to inject jwt, before calling enableMfa
await this.web3authInstance.login({
loginProvider: LOGIN_PROVIDER.JWT,
mfaLevel: 'optional' as any,
extraLoginOptions: {
id_token: idToken,
verifierIdField: 'sub',
domain: WEB3AUTH_DOMAIN,
isUserIdCaseSensitive: false,
},
curve: 'secp256k1',
dappShare: 'true',
})
await this.web3authInstance.enableMFA()
I can set up MFA in the login flow (when mfa set to ‘optional’), but I dont want to have the setup in the login flow, I want to add a button in Settings to “Enable MFA”.