Cannot enable email/phone login method #2

Sorry opening another issue but this is a contuniating of Cannot enable email/phone login method

So I enabled email and SMS but still the fields are disabled

await web3auth.initModal({
			modalConfig: {
				[WALLET_ADAPTERS.OPENLOGIN]: {
					label: 'openlogin',
					loginMethods: {
						// Enable email_passwordless and sms_passwordless
						email_passwordless: {
							name: 'email_passwordless',
							showOnModal: true
						},
						sms_passwordless: {
							name: 'sms_passwordless',
							showOnModal: true
						}
					}
				},
				// Disable Wallet Connect V2
				[WALLET_ADAPTERS.WALLET_CONNECT_V2]: {
					label: 'wallet_connect',
					showOnModal: false
				},
				// Disable Metamask
				[WALLET_ADAPTERS.METAMASK]: {
					label: 'metamask',
					showOnModal: false
				},
				// Disable Torus
				[WALLET_ADAPTERS.TORUS_EVM]: {
					label: 'torus_evm',
					showOnModal: false
				}
			}
		});

We also have the first paid tier, so no idea what else im doing wrong.

@Devv Thanks for reaching out.

Can you try the below code snippet:

await web3auth.initModal({
      modalConfig: {
        [WALLET_ADAPTERS.OPENLOGIN]: {
          label: "openlogin",
          loginMethods: {
            // Disable all social logins
            facebook: {
              name: "facebook",
              showOnModal: false,
            },
            reddit: {
              name: "reddit",
              showOnModal: false,
            },
            google: {
              name: "google",
              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,
            },
            twitter: {
              name: "twitter",
              showOnModal: false,
            },
            weibo: {
              name: "weibo",
              showOnModal: false,
            },
            wechat: {
              name: "wechat",
              showOnModal: false,
            },
           // enable EMAIL passwordless
           email_passwordless: {
           name: "email_passwordless",
           showOnModal: true,
           },
            // enable SMS passwordless
           sms_passwordless: {              
           name: "sms_passwordless",
           showOnModal: true,
           },
         },
       },  // Disable Wallet Connect V2
           [WALLET_ADAPTERS.WALLET_CONNECT_V2]: {
	   label: 'wallet_connect',   
	   showOnModal: false
	     },
	     // Disable Metamask
           [WALLET_ADAPTERS.METAMASK]: {
	   label: 'metamask',
	   showOnModal: false
	    },
	    // Disable Torus 
	   [WALLET_ADAPTERS.TORUS_EVM]: {
	   label: 'torus_evm',
	   showOnModal: false
	    },                  	
      }, 
});

@vjgee unfortunately still the same issue

@Devv Please specify the primaryButton parameter as emailLogin in your uiconfig:

   uiConfig: {
   appName: 'xxx',
   defaultLanguage: 'en',
   mode: 'dark',
   logoDark: '../logos/...-dark.svg',
   logoLight: '../logos/...-light.svg
   primaryButton: "emailLogin", // "externalLogin" | "socialLogin" | "emailLogin"
  }, 

This should fix your issue.

@vjgee still nothing :frowning:

this is what I have atm

const web3auth = new Web3Auth({
			web3AuthNetwork: 'mainnet',
			clientId: TORUS_CLIENT_ID,
			chainConfig: {
				chainNamespace: CHAIN_NAMESPACES.EIP155,
				chainId: '0x1', // Please use 0x1 for Mainnet
				rpcTarget: 'https://rpc.ankr.com/eth',
				displayName: 'Ethereum Mainnet',
				blockExplorer: 'https://etherscan.io/',
				ticker: 'ETH',
				tickerName: 'Ethereum'
			},
			uiConfig: {
				appName: '...',
				defaultLanguage: 'en',
				primaryButton: 'emailLogin',
				mode: 'dark',
				logoDark: '../logos/xxx-dark.svg',
				logoLight: '../logos/xxx-light.svg'
			}
		});

		await web3auth.initModal({
			modalConfig: {
				[WALLET_ADAPTERS.OPENLOGIN]: {
					label: 'openlogin',
					loginMethods: {
						// Disable all social logins
						facebook: {
							name: 'facebook',
							showOnModal: false
						},
						reddit: {
							name: 'reddit',
							showOnModal: false
						},
						google: {
							name: 'google',
							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
						},
						twitter: {
							name: 'twitter',
							showOnModal: false
						},
						weibo: {
							name: 'weibo',
							showOnModal: false
						},
						wechat: {
							name: 'wechat',
							showOnModal: false
						},
						// enable EMAIL passwordless
						email_passwordless: {
							name: 'email_passwordless',
							showOnModal: true
						},
						// enable SMS passwordless
						sms_passwordless: {
							name: 'sms_passwordless',
							showOnModal: true
						}
					}
				}, // Disable Wallet Connect V2
				[WALLET_ADAPTERS.WALLET_CONNECT_V2]: {
					label: 'wallet_connect',
					showOnModal: false
				},
				// Disable Metamask
				[WALLET_ADAPTERS.METAMASK]: {
					label: 'metamask',
					showOnModal: false
				},
				// Disable Torus
				[WALLET_ADAPTERS.TORUS_EVM]: {
					label: 'torus_evm',
					showOnModal: false
				}
			}
		});

currently I am using mainnet on localhost since we only use 1 network for both local/dev/prod. does it make a difference?

@Devv Can you hard refersh the page on Chrome browser and check the changes?

Windows: Hold down Ctrl and ⇧ Shift and then press R . Or, hold the Ctrl key and press the F5 key.

Mac: Hold down Cmd (Command) + Shift + R.

@vjgee already did it lots of times but made no difference

Hi @Devv,

Your code seems to be ok, would you mind sharing with me the github repository ?
So I can check it .

@Devv Could you share your Github repo if you are still facing the issue to assist you further/

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