Browser not redirecting back to android app after login

I have converted the react web app to the android app using capacitor, after succesful social login its not redirecting back to android app instead its just get stuck at browser.

please check video on this link @cld/asset-share

Please find the configuration.
Kindly help me to fix this behaviour

@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();

Hey @puneet,

I noticed you’re transitioning a web app to an Android app using Capacitor.js. It’s important to mention that the navigation dynamics, particularly redirects in a web app, differ significantly from deep linking in an Android environment. For a more seamless integration that leverages Android’s capabilities, I recommend utilizing our Android SDK.

To get you started with deep linking, which is crucial for this transition, check out our comprehensive guide to deep links and app links in Android. This resource should provide you with the necessary insights and steps to implement deep linking effectively in your app.

Should you need further assistance or have any questions, feel free to reach out.

1 Like