Unable to detect login share from the Auth Network. This may be due to slow internet connection. Check your internet speed and try again. If you're using a vpn, please turn it off

const login = useCallback(async () => {
    try {
      const clientId =
        "BOUn3gnRgUBl8j-C6PjOoSqv87bU2NnNeYtXNV-3NuXY6OLuiiAC4STtBAexzXkLQv8jauiBubvWzqH_PbmMVrk";
      const chainConfig = {
        chainNamespace: CHAIN_NAMESPACES.EIP155,
        chainId: "0x1",
        rpcTarget:
          "https://eth.getblock.io/ba715440-9e0d-4ccd-971f-76775c05d886/mainnet/",
        displayName: "Ethereum Mainnet",
        blockExplorer: "https://etherscan.io",
        ticker: "ETH",
        tickerName: "Ethereum",
      };
      const web3auth = new Web3AuthNoModal({
        clientId,
        chainConfig,
        web3AuthNetwork: "mainnet",
        useCoreKitKey: false,
      });

      const privateKeyProvider = new EthereumPrivateKeyProvider({
        config: { chainConfig },
      });

      const openloginAdapter = new OpenloginAdapter({
        adapterSettings: {
          uxMode: "redirect",
          loginConfig: {
            jwt: {
              verifier: "Mesmrlab-auth-verifier",
              typeOfLogin: "jwt",
              clientId,
            },
          },
        },
        privateKeyProvider,
        web3AuthNetwork: "mainnet",
      });

      web3auth.configureAdapter(openloginAdapter);
      await web3auth.init();

      const { data } = await axios.post(
        "http://localhost:3000/api/v1/auth/web3-login",
        {
          clientId: "3dd413ba-a90b-4eeb-9178-bdbec9cc8a71",
          userId: "640689bf-6b74-42ef-a43a-ffaa6abeffec",
        }
      );

      await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
        loginProvider: "jwt",
        extraLoginOptions: {
          id_token: data.data.accessToken,
          verifierIdField: "sub", // sub, email, or custom
        },
      });
    } catch (error) {
      console.log(error);
    }
  }, []);

I am not sure what is wrong i am doing? can you please guide me?

Thank you :slight_smile:

@react Welcome Aboard!

Have you setup a Custom verifier in your Dashboard instead of Default Verifier? Is the network for the verifier also MAINNET on the Dashboard and is it Live?

Hi @vjgee

Yes i have done setup in Dashboard.

Please check attached screenshots and let me know if i have done anything wrong.

Thank you :slight_smile:

Thanks for confirming!

I have forwarded your issue to our Dev team and you will receive further updates.

Thank you @vjgee

I’m eager to receive your reply :slight_smile:

Hey @vjgee

Have you found any solution or not?

@react Your issue was already forwarded to our Dev team. I will get back to you by Monday with an update. In the meantime, please ensure you are on the latest version of the SDK.

@vjgee

I am using latest version of the SDK.

"dependencies": {
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "^13.0.0",
    "@testing-library/user-event": "^13.2.1",
    "@types/jest": "^27.0.1",
    "@types/node": "^16.7.13",
    "@types/react": "^18.0.0",
    "@types/react-dom": "^18.0.0",
    "@walletconnect/qrcode-modal": "^1.8.0",
    "@walletconnect/sign-client": "^2.10.0",
    "@web3auth/base": "^6.1.7",
    "@web3auth/base-provider": "^6.1.7",
    "@web3auth/ethereum-provider": "^6.1.7",
    "@web3auth/modal": "^6.1.7",
    "@web3auth/no-modal": "^6.1.7",
    "@web3auth/openlogin-adapter": "^6.1.7",
    "@web3auth/solana-provider": "^6.1.7",
    "axios": "^1.4.0",
    "react": "^18.2.0",
    "react-app-rewired": "^2.2.1",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "typescript": "^4.4.2",
    "web-vitals": "^2.1.0",
    "web3": "^4.1.1"
  }

Hi @react , The verifier you have shown is created on Sapphire Mainnet which is different than Mainnet. Sapphire Mainnet works only for MPC for now. Please re-create a new verifier on Cyan Mainnet and give the web3AuthNetwork as cyan with the new verifier name.

Hi @maharshi

Can you know me how can i use Sapphire Mainnet?

1 Like

It’ll be made available for users of PnP SDKs. for now I’ll advise you to use cyan mainnet.

Does cyan mainnet work world wide users?

1 Like

All our networks work for users all over the world. You are fine with using Cyan.

Then what is mean of “Ideal for apps near the USA”?

1 Like

These networks are hosted nodes In some or the other availability zones located in some geographical region. The places geographically closest to the nodes will receive the lowest latency, hence the ideal for USA. But you needn’t worry, this will work well anywhere on the globe.

Thank you @maharshi :slight_smile:

1 Like