Description:
Summary: In our android app created using Capacitor by converting our react web app, social login behaviour is not as expected.
Steps to Reproduce:
Open the mobile app.
Click on login icon (in our app its a wallet icon)
Select social login
Click on continue with google (it will take you to browser tab)
Select the account to login and click continue
Expected behaviour: Upon successful login, the user should be automatically redirected back to the Android app, and the browser tab
should be closed seamlessly.
Actual Behaviour: After logging in, the user becomes trapped in the browser tab and isn’t automatically redirected back to the Android
app. However, if they manually navigate back to the app, they will find themselves logged in.
Screenshots/Recordings: Please find a recorded video link to understand issue properly.
Mobile Device: Android device
Library used for social login
“@web3auth/base”: “^7.3.2”,
“@web3auth/modal”: “^7.3.2”
const web3auth = new Web3Auth({
clientId: WEB_3_AUTH_CLIENT_ID,
chainConfig: {
chainId: numberToHex(CHAIN_ID),
chainNamespace: "eip155",
},
uiConfig: {
dark: true,
},
web3AuthNetwork: web3AuthNetwork[CHAIN_ID],
});
await web3auth.initModal({
modalConfig: {
[WALLET_ADAPTERS.OPENLOGIN]: allowedSocialMethods,
},
});
await web3auth.connect();
const web3Instance = new Web3(web3auth.provider);
const accounts = await web3Instance.eth.getAccounts();