The login flow using the web3auth.login
function is failing specifically on Android devices, showing the following error message: “[Web3Auth] login flow failed with error type dismiss”. It’s worth noting that the same functionality works flawlessly on iOS, and the ID token obtained from Google also works without any problems.
I have thoroughly reviewed the documentation and explored possible reasons for this issue, including permissions, configuration settings, and any platform-specific limitations. However, I have not been able to identify the root cause.
- Android device tested: Pixel 3a API 32 arm64 v8a
- Android API level: 11
- Relevant library versions:
“react-native-google-signin/google-signin”: “^10.0.1”,
“toruslabs/react-native-web-browser”: “^1.1.0”,
“web3auth/react-native-sdk”: “^3.1.0”, - SDK Version: 3.1.0
- Expo or Bare Version: bare
useEffect(() => {
GoogleSignin.configure({
scopes: [],
webClientId: WEB_CLIENT_ID,
offlineAccess: true,
});
}, []);
const signInWeb3Auth = async () => {
const idToken = await signInWithGoogle();
const clientId = 'example';
const network = OPENLOGIN_NETWORK.CYAN;
const web3auth = new Web3Auth(WebBrowser, {
clientId,
network,
});
const redirectUrl = "${myscheme}://openlogin";
const state = await web3auth.login({
loginProvider: LOGIN_PROVIDER.GOOGLE,
redirectUrl,
extraLoginOptions: {
id_token: idToken,
verifierIdField: "sub",
},
});
if (state.privKey === undefined) {
throw new Error("No private key");
}
return state.privKey;
};
If there are any specific code snippets or debug logs that would be helpful, please let me know, and I will be happy to provide them.