Please provide the following details too when asking for help in this category:
- SDK Version:
“@web3auth/metamask-adapter”: “^5.2.0”,
“@web3auth/no-modal”: “^5.2.0”,
“@web3auth/openlogin-adapter”: “^5.2.1”,
“@web3auth/base”: “^5.2.0”, - Platform:
macOS
Node 20 - Browser Console Screenshots:
Please provide the Web3Auth initialization and login code snippet below:
export class Web3AuthSingleton {
private static web3Auth: Web3AuthNoModal;
private static init() {
const auth = new Web3AuthNoModal(web3AuthConfig as any);
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
uxMode: 'popup',
loginConfig: {
jwt: {
verifier: 'verifier,
typeOfLogin: 'jwt',
clientId: web3AuthConfig.clientId,
},
},
},
loginSettings: {
mfaLevel: 'none',
},
});
const metamaskAdapter = new MetamaskAdapter({});
Web3AuthSingleton.web3Auth = auth
.configureAdapter(metamaskAdapter)
.configureAdapter(openloginAdapter);
}
public static get instance() {
if (!Web3AuthSingleton.web3Auth) {
Web3AuthSingleton.init();
}
return Web3AuthSingleton.web3Auth;
}
}
const auth = Web3AuthSingleton.instance;
await auth.init();
this.vueApp = this.createVueApp();
await auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: 'google'
});
The open login adapter status is indeed not ready, but the metamask adapter is (so metamask connection works). I don’t know what’s wrong because this code works in other projects.