Unable to login using Web3 Modal SDK, login provider: email_passwordless

I was trying with the email_passwordless in web-modal SDK. but continuously facing this error. It seems like a CORS error. But I also tried with the local React project, it seems ok in there and shows the OTP perfectly.

let web3authh = new window.Modal.Web3Auth({
      chainConfig: {
        chainNamespace: "eip155",
        rpcTarget: "https://polygon-rpc.com",
        blockExplorer: "https://polygonscan.com/",
        chainId: "0x89",
        dChainId: "137",
        displayName: "Polygon Mainnet",
        ticker: "matic",
        tickerName: "Matic",
        decimals: 18,
      },
      clientId: clientIdObj.cyan,
      web3AuthNetwork: "cyan", // cyan for prod, mainnet for stage and testnet for dev
      enableLogging: true,
      uiConfig: {
        mode: "dark",
        loginMethodsOrder: ["google", "apple", "twitter", "discord"],
        appLogo: __APP_LOGO,
        modalZIndex: "99998",
        defaultLanguage: "en",
      },
    });

const openloginAdapter = new window.OpenloginAdapter.OpenloginAdapter({
      loginSettings: {
        mfaLevel: "none", // this is imp
      },

      adapterSettings: {
        network: "cyan",
        uxMode: "redirect",
        _iframeUrl: "https://fox.web3auth.com",
        whiteLabel: {
          appName: "Maskverse",
          theme: {
            primary: "#9333EA",
          },
          logoLight: __APP_LOGO,
          logoDark: __APP_LOGO,
          defaultLanguage: "en",
        },
      },
    });

const openloginConfig = {
      "openlogin": {
        label: "openlogin",
        loginMethods: {
          // email_passwordless: {
          //   name: "email_passwordless",
          //   showOnModal: false
          // },
          sms_passwordless: {
            name: "sms_passwordless",
            showOnModal: false
          }
        }
      }
    }
await web3authh.initModal({ modalConfig: openloginConfig });

@araf.hossain Welcome Aboard!

Which version of modal SDK you are on? Can you share your Dapp URL to replicate the issue?

1 Like

Hey @vjgee

Good to see you. Could you please test in here?

You will find the issue.

@vjgee ,

I updated the post and added a few codes.

These scripts are used here. It would be great if you have some time to check the above URL.

<script src="https://cdn.jsdelivr.net/npm/@web3auth/modal" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/metamask-adapter" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/wallet-connect-v2-adapter" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/torus-evm-adapter" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/torus-wallet-connector-plugin" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/openlogin-adapter" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@web3auth/coinbase-adapter" defer></script>
<script src="https://cdn.jsdelivr.net/npm/web3@1.7.3/dist/web3.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ethers/5.6.8/ethers.umd.min.js" defer></script>

Thanks for your detailed reply.

I have forwarded your issue to our Dev team and will get back with an update once I hear back from them.

1 Like

@vjgee ,

Thank you so much. I appreciate your concern.

Waiting to hear you…

@vjgee ,

I just got the solution by removing the two labels from the whiteLable{} .
Those are logoLight & logoDark.

I have seen this in here.

2 Likes

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