Login popup has been closed by the user (part 2)

this is the old topic we discussed in.
we dont want to use the native modal, were want to have no modal -
(using our own buttons with your functionality)
this is our code :

const chainConfig = {
            chainNamespace: state.web3AuthCfg.chainNamespace,
            chainId: state.web3AuthCfg.chainId,
            rpcTarget: state.web3AuthCfg.rpcTarget,
            displayName: state.web3AuthCfg.displayName,
            blockExplorer: state.web3AuthCfg.blockExplorer,
            ticker: state.web3AuthCfg.ticker,
            tickerName: state.web3AuthCfg.tickerName,
        };
        const web3auth = new Web3AuthNoModal({
            clientId: APP.state.get('web3_auth_token'),
            web3AuthNetwork: APP.state.get('web3_auth_network'),
            chainConfig,
        });
        const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig } });
        const openloginAdapter = new OpenloginAdapter({
            privateKeyProvider,
            adapterSettings: {
                uxMode: browserName.toLowerCase().includes('safari') ? 'redirect' : 'popup',
                storageServerUrl: 'https://session-sg.web3auth.io'
            }
        });
        web3auth.configureAdapter(openloginAdapter);
        await web3auth.init();
       await web3auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: type,
                });

these are the sdk libraries:

"@web3auth/base": "^7.3.0",
    "@web3auth/modal": "^7.3.0",
    "@web3auth/torus-wallet-connector-plugin": "^7.3.0",
    "@web3auth/wallet-connect-v2-adapter": "^7.3.0",
    "@web3modal/ethers": "^3.5.0",
    "@web3modal/wallet": "^3.5.0",

this is the error we get after finishing the login process (after the popup is closed - not by us)

Hey @idob,

I hope everything’s going great with you. I highly recommend taking a look at our example for the no-modal SDK. It’s a fantastic resource that could really help clarify the functionality for you. Here’s the link for easy access: https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-no-modal-sdk/blockchain-connection-examples/evm-no-modal-example.

Also, to ensure you’re getting the most out of it, I suggest updating to our latest version. You can find all the details you need in the package.json file.

If there’s anything else you need or if you have any questions after checking out the example, I’m here to help.

1 Like

hey tom. thank you for you answer.
but unfortunately it didnt work.
our dev said he did exactly as you said and it didnt change the outcome

@TomTom do you have any idea what can we do?

this is what we got in the console before the “login popup has been closed by the user” error

Hi @idob,

I noticed you’re encountering an error. Is it the same one you came across initially? To help you more effectively, could you share a bit more of your code with us? Specifically, I’m interested in the value of “type” in your setup. Additionally, if you could also share your package.json, it would greatly help me in reproducing the error on my end.

Thank you for providing these details. I’m here to assist you through this issue, so let’s get it sorted out together.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.