Getting invalid login provider with custom auth0 verifier

When asking for help in this category, please make sure to provide the following details:

  • SDK Version: ^8.12.4

  • Platform: Auth0

  • Browser Console Screenshots:
    Web3AuthComponent.tsx:88 Failed to connect with openlogin provider LoginError: login popup has been closed by the user,
    at LoginError.fromCode (openlogin.esm.js:113:12)
    at LoginError.popupClosed (openlogin.esm.js:125:23)
    at PopupHandler.eval (openlogin.esm.js:704:27)
    at PopupHandler.emit (events.js:153:5)
    at eval (openlogin.esm.js:308:18)
    window.console.error @ app-index.js:33
    console.error @ hydration-error-info.js:63
    connect @ openloginAdapter.esm.js:140
    await in connect
    connectTo @ noModal.esm.js:211
    connectToLinkedin @ Web3AuthComponent.tsx:88
    await in connectToLinkedin
    callCallback @ react-dom.development.js:20565
    invokeGuardedCallbackImpl @ react-dom.development.js:20614
    invokeGuardedCallback @ react-dom.development.js:20689
    invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:20703
    executeDispatch @ react-dom.development.js:32128
    processDispatchQueueItemsInOrder @ react-dom.development.js:32160
    processDispatchQueue @ react-dom.development.js:32173
    dispatchEventsForPlugins @ react-dom.development.js:32184
    eval @ react-dom.development.js:32374
    batchedUpdates$1 @ react-dom.development.js:24953
    batchedUpdates @ react-dom.development.js:28844
    dispatchEventForPluginEventSystem @ react-dom.development.js:32373
    dispatchEvent @ react-dom.development.js:30141
    dispatchDiscreteEvent @ react-dom.development.js:30112
    Show 18 more frames
    Show lessUnderstand this error
    Web3AuthComponent.tsx:104 Failed to connect with openlogin provider WalletLoginError: Failed to connect with wallet. Failed to login with openlogin
    at WalletLoginError.fromCode (base.esm.js:196:12)
    at WalletLoginError.connectionError (base.esm.js:199:29)
    at OpenloginAdapter.connect (openloginAdapter.esm.js:149:74)
    at async Web3AuthNoModal.connectTo (noModal.esm.js:211:22)
    at async connectToLinkedin (Web3AuthComponent.tsx:88:7)Caused by: LoginError: login popup has been closed by the user,
    at LoginError.fromCode (openlogin.esm.js:113:12)
    at LoginError.popupClosed (openlogin.esm.js:125:23)
    at PopupHandler.eval (openlogin.esm.js:704:27)
    at PopupHandler.emit (events.js:153:5)
    at eval (openlogin.esm.js:308:18)

  • If the issue is related to Custom Authentication, please include the following information (optional):

    • Verifier Name: verifi-social-login-verifier
    • JWKS Endpoint: using auth0 domain
    • Sample idToken (JWT): using Email for JWT

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.

here is my web3auth component,

“use client”; // Add this directive at the top

import React, { useEffect, useState } from ‘react’;
import { Web3AuthNoModal } from “@web3auth/no-modal”;
import { OpenloginAdapter } from “@web3auth/openlogin-adapter”;
import { EthereumPrivateKeyProvider } from “@web3auth/ethereum-provider”;
import { CHAIN_NAMESPACES } from “@web3auth/base”;

const clientId = “”;

const chainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: “0x1”,
rpcTarget: “https://rpc.ankr.com/eth”,
displayName: “Ethereum Mainnet”,
blockExplorerUrl: “https://etherscan.io”,
ticker: “ETH”,
tickerName: “Ethereum”,
logo: “https://images.toruswallet.io/ethereum.svg”,
};

const Web3AuthComponent: React.FC = () => {
const [web3auth, setWeb3auth] = useState<Web3AuthNoModal | null>(null);

useEffect(() => {
const initializeWeb3Auth = async () => {
const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig } });

  const web3authInstance = new Web3AuthNoModal({
    clientId,
    web3AuthNetwork: "sapphire_mainnet",
    privateKeyProvider: privateKeyProvider,
  });

  const openloginAdapter = new OpenloginAdapter({
    adapterSettings: {
      loginConfig: {
        google: {
          verifier: "verifi-social-login-verifier",
          verifierSubIdentifier: "google-auth0",
          typeOfLogin: "jwt",
          clientId: "",
        },
        linkedin: {
          verifier: "verifi-social-login-verifier",
          verifierSubIdentifier: "linkedin-auth0",
          typeOfLogin: "jwt",
          clientId: "",
        },
        github: {
          verifier: "verifi-social-login-verifier",
          verifierSubIdentifier: "github-auth0",
          typeOfLogin: "jwt",
          clientId: "",
        },
        twitter: {
          verifier: "verifi-social-login-verifier",
          verifierSubIdentifier: "twitter-auth0",
          typeOfLogin: "jwt",
          clientId: "",
        },
        emailpasswordless: {
          verifier: "verifi-social-login-verifier",
          verifierSubIdentifier: "email-pw-auth0",
          typeOfLogin: "jwt",
          clientId: "",
        },
      },
    },
    privateKeyProvider,
  });

  web3authInstance.configureAdapter(openloginAdapter);
  setWeb3auth(web3authInstance);
};

initializeWeb3Auth();

}, []);

const connectToLinkedin = async () => {
if (!web3auth) {
uiConsole(“web3auth not initialized yet”);
return;
}

try {
  await web3auth.init();
  await web3auth.connectTo("openlogin", {
    loginProvider: "jwt",
    extraLoginOptions: {
      domain: "https://dev-2uegducfnv75kjbo.us.auth0.com",
    },
  });
} catch (error) {
  uiConsole("Failed to connect with openlogin provider", error);
}

};

const uiConsole = (…args: any[]): void => {
const el = document.querySelector(“#console>p”);
if (el) {
el.innerHTML = JSON.stringify(args || {}, null, 2);
}
console.log(…args);
};

return (


Connect LinkedIn




);
};

export default Web3AuthComponent;

Hey Liam,

Thank you for providing all the details! It looks like you’re facing an issue with the Web3Auth integration on the Auth0 platform, specifically getting an “invalid login provider” error related to the custom Auth0 verifier.

Here’s a quick summary for the support team:

Summary of Issue:

SDK Details: MPC Core Kit SDK
SDK Version: ^8.12.4
Platform: Auth0
Verifier Name: verifi-social-login-verifier
JWKS Endpoint: using Auth0 domain
Sample idToken (JWT): using Email for JWT

Error Messages:

  • From Browser Console:
    Web3AuthComponent.tsx:88 Failed to connect with openlogin provider LoginError: login popup has been closed by the user, 
        at LoginError.fromCode (openlogin.esm.js:113:12)
        at LoginError.popupClosed (openlogin.esm.js:125:23)
        at PopupHandler.eval (openlogin.esm.js:704:27)
        at PopupHandler.emit (events.js:153:5)
        at eval (openlogin.esm.js:308:18)
    window.console.error @ app-index.js:33
    console.error @ hydration-error-info.js:63
    connect @ openloginAdapter.esm.js:140
    await in connect
    connectTo @ noModal.esm.js:211
    connectToLinkedin @ Web3AuthComponent.tsx:88
    await in connectToLinkedin
    callCallback @ react-dom.development.js:20565
    invokeGuardedCallbackImpl @ react-dom.development.js:20614
    invokeGuardedCallback @ react-dom.development.js:20689
    invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:20703
    executeDispatch @ react-dom.development.js:32128
    processDispatchQueueItemsInOrder @ react-dom.development.js:32160
    processDispatchQueue @ react-dom.development.js:32173
    dispatchEventsForPlugins @ react-dom.development.js:32184
    eval @ react-dom.development.js:32374
    batchedUpdates$1 @ react-dom.development.js:24953
    batchedUpdates @ react-dom.development.js:28844
    dispatchEventForPluginEventSystem @ react-dom.development.js:32373
    dispatchEvent @ react-dom.development.js:30141
    dispatchDiscreteEvent @ react-dom.development.js:30112
    Show lessUnderstand this error
    Web3AuthComponent.tsx:104 Failed to connect with openlogin provider WalletLoginError: Failed to connect with wallet. Failed to login with openlogin
        at WalletLoginError.fromCode (base.esm.js:196:12)
        at WalletLoginError.connectionError (base.esm.js:199:29)
        at OpenloginAdapter.connect (openloginAdapter.esm.js:149:74)
        at async Web3AuthNoModal.connectTo (noModal.esm.js:211:22)
        at async connectToLinkedin (Web3AuthComponent.tsx:88:7)Caused by: LoginError: login popup has been closed by the user,
        at LoginError.fromCode (openlogin.esm.js:113:12)
        at LoginError.popupClosed (openlogin.esm.js:125:23)
        at PopupHandler.eval (openlogin.esm.js:704:27)
        at PopupHandler.emit (events.js:153:5)
        at eval (openlogin.esm.js:308:18)
    

Initialization and Login Code Snippets:

  • Initialization:

    const initializeWeb3Auth = async () => {
      const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig } });
    
      const web3authInstance = new Web3AuthNoModal({
        clientId,
        web3AuthNetwork: "sapphire_mainnet",
        privateKeyProvider: privateKeyProvider,
      });
    
      const openloginAdapter = new OpenloginAdapter({
        adapterSettings: {
          loginConfig: {
            google: {
              verifier: "verifi-social-login-verifier",
              verifierSubIdentifier: "google-auth0",
              typeOfLogin: "jwt",
              clientId: "",
            },
            // Other login configurations...
          },
        },
        privateKeyProvider,
      });
    
      web3authInstance.configureAdapter(openloginAdapter);
      setWeb3auth(web3authInstance);
    };
    
  • Login Function:

    const connectToLinkedin = async () => {
      if (!web3auth) {
        uiConsole("web3auth not initialized yet");
        return;
      }
    
      try {
        await web3auth.init();
        await web3auth.connectTo("openlogin", {
          loginProvider: "jwt",
          extraLoginOptions: {
            domain: "https://dev-2uegducfnv75kjbo.us.auth0.com",
          },
        });
      } catch (error) {
        uiConsole("Failed to connect with openlogin provider", error);
      }
    };
    

Possible Points of Investigation:

  1. Verifier Settings: Ensure that the verifier name matches exactly between Auth0 and your Web3Auth configuration.
  2. Client ID: It appears that client IDs for various login providers are not populated. Make sure the clientId fields are properly filled.
  3. Domain: Verify that extraLoginOptions.domain matches the actual Auth0 domain.

This response was generated by the Web3Auth Bot and a person from the Web3Auth team will review and provide further assistance shortly.

clientIds are hidden, I have created an auth0 application

Hey @liamfaruq,

You can safely share your client IDs. Both Auth0 and Web3Auth operate on the principle that domains must be explicitly whitelisted on your dashboard, so unless you’ve whitelisted the domain yourself, there’s no way someone can misuse your client ID.

I believe this could be an Auth0 setup issue. Could you also share the verifier setup page from your Web3Auth dashboard? That might help us pinpoint the problem.

Thanks for reaching out, this issue has now been resolved. I had to configure a web3auth callback url into the linkedin provider aswell

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