Archived Content from Web3Auth Community
This topic was originally posted by aaron2 on 5/14/2025.
This content has been migrated from our previous community forum to preserve valuable discussions.
Iâm upgrading all packages from v7.3.0 to v9.7.0
In v7 the modal login was working flawlessly with this configuration:
await web3auth.initModal({
modalConfig: {
openlogin: {
label: "openlogin",
loginMethods: {
google: {
name: "google",
mainOption: true,
},
facebook: {
name: "facebook",
mainOption: true,
},
email_passwordless: {
name: "email_passwordless",
showOnModal: false,
},
phone_passwordless: {
name: "phone_passwordless",
showOnModal: false,
},
...
},
},
Since v9.7.0 it looks like openlogin is no longer working.
Iâm trying to replicate the react-modal-playground demo found https://pnp-modal-playground.vercel.app/
but I donât understand how Iâm supposed to initialize my modal since I donât use the context and those react hooks.
Iâm getting the following error:
Uncaught (in promise) WalletInitializationError: Invalid params passed in, Invalid wallet connect project id. Please configure it on the dashboard
at WalletInitializationError.fromCode (index.js:73:12)
at WalletInitializationError.invalidParams (index.js:108:38)
at eval (modalManager.js:256:567)
at Array.map ()
at Web3Auth.initModal (modalManager.js:106:54)
at async Object.initWeb3Auth
And this is the code Iâm using:
const clientId = process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID!; const chainId = process.env.NEXT_PUBLIC_IS_DEVELOPMENT ? 0x13882 : 0x89; // Mumbai or Polygon Mainnetconst chainConfig = getEvmChainConfig(chainId, clientId)!;
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig },
});const web3AuthOptions: Web3AuthOptions = {
clientId,
web3AuthNetwork: process.env.NEXT_PUBLIC_IS_DEVELOPMENT
? âsapphire_devnetâ
: âsapphire_mainnetâ,
privateKeyProvider,
};
const authAdapter = new AuthAdapter({
loginSettings: {
mfaLevel: MFA_LEVELS.OPTIONAL,
},
adapterSettings: {
uxMode: âredirectâ
},
});const walletServicesPlugin = new WalletServicesPlugin({
wsEmbedOpts: {},
walletInitOptions: {
whiteLabel: { showWidgetButton: true, buttonPosition: BUTTON_POSITION.BOTTOM_RIGHT },
confirmationStrategy: CONFIRMATION_STRATEGY.MODAL,
},
});web3auth = new Web3Auth(web3AuthOptions);
// Configure default adapters
const adapters = getDefaultExternalAdapters({ options: web3AuthOptions });
[âŚadapters, authAdapter].forEach((adapter: IAdapter<unknown>) => {
web3auth.configureAdapter(adapter);
});web3auth.addPlugin(walletServicesPlugin);
await web3auth.initModal({
modalConfig: {
openlogin: {
label: âopenloginâ,
loginMethods: {
google: {
name: âgoogleâ,
mainOption: true,
},
facebook: {
name: âfacebookâ,
mainOption: true,
},
email_passwordless: {
name: âemail_passwordlessâ,
showOnModal: false,
},
phone_passwordless: {
name: âphone_passwordlessâ,
showOnModal: false,
},
twitter: {
name: âtwitterâ,
showOnModal: false,
},
reddit: {
name: âredditâ,
showOnModal: false,
},
discord: {
name: âdiscordâ,
showOnModal: false,
},
twitch: {
name: âtwitchâ,
showOnModal: false,
},
apple: {
name: âappleâ,
showOnModal: false,
},
line: {
name: âlineâ,
showOnModal: false,
},
github: {
name: âgithubâ,
showOnModal: false,
},
kakao: {
name: âkakaoâ,
showOnModal: false,
},
linkedin: {
name: âlinkedinâ,
showOnModal: false,
},
weibo: {
name: âweiboâ,
showOnModal: false,
},
wechat: {
name: âwechatâ,
showOnModal: false,
},
},
showOnModal: true,
},
},
});
- SDK Version(package.json):9.7.0
- Platform: NextJS
Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.