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)