Web3 auth WalletLoginError: Failed to connect with walletAlready connected

I got the following error when I tried to login with wallet in web3auth login modal. I cannot even chose metamask or anything as soon as i chose the wallet option in the modal it gives me the error.! authError|654x500

I think I have not logged out properly in my last session so I have manually called the logout function from useMoralis(). However, either I get the same error or it gets stuck in authentication process when i click the login button. Also, when I logged out manually and tried to login with magic(discord) It logged in but when I logged out again and tried with wallet got the same error.

—EDIT—
The weird thing is after this error my wallet that I last logged in with got locked and it said “MetaMask encountered an error due to reaching a storage limit” and I couldn’t login back to my wallet. After I deleted my wallet It started working again. I don’t know if it is related or not.

1 Like

what way are you writing your code could u share. yeah weird it says that your alrady connected in that error message

const handleCustomLogin = async () => {
    await authenticate({
      provider: "web3Auth",
      clientId: clientID,
      chainId: chain
    });
  };
{ chainSelected &&

    <div className={styles.card}>
      <Image className={styles.img} src={Logo} width={80} height={80} />
      {isAuthenticating && <p className={styles.green}>Authenticating</p>}
      {authError && (
        <p className={styles.error}>{JSON.stringify(authError.message)}</p>
      )}
      <div className={styles.buttonCard}>
        <button className={styles.loginButton} onClick={handleCustomLogin}>
          Login with Web3Auth
        </button>
      </div>
      
    </div>
    }