When asking for help in this category, please make sure to provide the following details:
- SDK Version:
“@web3auth/base-provider”: “9.7.0”,
“@web3auth/react-native-sdk”: “8.1.0” - Platform:
React Native
Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.
import * as WebBrowser from 'expo-web-browser'
import * as SecureStore from 'expo-secure-store'
import Web3Auth, { type SdkLoginParams } from '@web3auth/react-native-sdk'
import {
CommonPrivateKeyProvider,
type CommonPrivKeyProviderConfig,
} from '@web3auth/base-provider'
const auth = new Web3Auth(WebBrowser, SecureStore, {
clientId: expoConstants.web3authClientId,
network: expoConstants.web3authNetwork,
privateKeyProvider,
redirectUrl,
mfaSettings: {
deviceShareFactor: {
enable: true,
priority: 1,
mandatory: true,
},
passwordFactor: {
enable: true,
priority: 2,
mandatory: true,
},
// 12 word recovery phrase
backUpShareFactor: {
enable: true,
priority: 3,
mandatory: false,
},
socialBackupFactor: {
enable: true,
priority: 4,
mandatory: false,
},
authenticatorFactor: {
enable: true,
priority: 5,
mandatory: false,
},
},
})
void auth.init()
Hey support team!
I’m using the latest React Native SDK, with relevant initialization code above. My implementation works great, no issues with initialization / deep link flow, etc.
The issue I’m seeing is with users attempting to set up their authenticator app for security.
Expo Web Browser does not persist if you background the Web3Auth flow in order to open an authenticator app like Google Authenticator.
What this does is that the user tries to set up authentication, goes to their auth app, and when they come back the whole Web3Auth flow is gone.
Is there a way to persist this webview, or an alternative to Expo Web Browser that I can provide to the React Native SDK initialization (preferably one that is supported by Expo…)
Thank you!