Not able to disable phone in openlogin pnp modal

Hey Team,

I am not able to disable phone in pnp modal. I have tried solutions in other forums but it seems not working for us.

Following is the code we are using

Web3 config

const web3auth = new Web3Auth({
        clientId,
        uiConfig: {
          appName: 'Avatar.One',
          
          mode: 'dark',
          loginMethodsOrder: ['google', 'apple', 'twitter', 'discord'],
          logoLight: '/images/logo-black.png',
          logoDark: '/images/logo-all-white.png',
          defaultLanguage: 'en', // en, de, ja, ko, zh, es, fr, pt, nl
          loginGridCol: 3,
          primaryButton: 'externalLogin', // "externalLogin" | "socialLogin" | "emailLogin"
          uxMode: 'redirect',
        },
        web3AuthNetwork: WEB3AUTH_NETWORK[import.meta.env.VITE_APP_WEB3_AUTH_VERIFIER],
        privateKeyProvider: solanaPrivateKeyPrvoider,
      });

Modal Config

await web3auth.initModal(
        {
          modalConfig: {
            [WALLET_ADAPTERS.OPENLOGIN]: {
              label: "openlogin",
              loginMethods: {
                  email_passwordless: {
                  name: "email_passwordless",
                  showOnModal: true,
                },
                sms_passwordless: {
                  name: "sms_passwordless",
                  showOnModal: false
                  
                },
                
              },
            },
          },
        }
      );

hi @nitesh.1071

I’m trying your code and its working ok for me.
Could you please check out this example and its associated packages: web3auth-pnp-examples/web-modal-sdk/blockchain-connection-examples/evm-modal-example at main · Web3Auth/web3auth-pnp-examples · GitHub

Would you mind sharing with me the versions of the packages you’re using? It would help ensure compatibility and provide better assistance.
Thanks a lot!

Hey @TomTom

I was able to pinpoint the issue.
In shared example above if I delete package-lock.json then I can reproduce the issue there as well.

Seems like removing phone only works with following versions.

"@web3auth/base": "8.0.0",
    "@web3auth/default-solana-adapter": "8.0.1",
    "@web3auth/modal": "8.0.1",
    "@web3auth/no-modal": "8.0.1",
    "@web3auth/solana-provider": "8.0.1",

For now it has fixed issue for me with above shared version. Let me know if I am missing any important features or bug fixes in these versions.

Regards,
Nitesh

Hey @nitesh.1071, just a heads-up that the latest version, v8.3.0, is now available with the latest bug fixes. With this update, you can disable SMS OTP directly from the updated dashboard. Documentation with detailed instructions will be available soon. In the meantime, you can turn off this feature through the dashboard settings to disable SMS OTP.

Thanks @maharshi it works.

1 Like

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