Login error Error: required more shares at Web3AuthMPCCoreKit.setupTkey

Hi
When trying to log in, there’s an error because the system needs more information, referred to as ‘shares,’ to complete the login. This missing data is causing the issue. You may need to check the configuration or input data to ensure all the necessary information is provided during the login process.

This shares maybe store in local device (local storage) but suppose the local storage is clear that time how to re-login in my application and try to login that time show the error.

image

how to solve this error ?

@limbachiyachintan500 Thanks for reaching out.

Your issue has been forwarded to our Dev team and we will get back with an update.

@vjgee Thank you for the update.

I appreciate your prompt response. Please keep me posted on any developments regarding the issue. Looking forward to hearing from your Dev team.

Is this happening on Sapphire Mainnet or Devnet?

@vjgee No. sepolia testnet not Mainnet
https://eth-sepolia.g.alchemy.com/

So on the Dashboard what Environment have you selected ? Testnet?

@vjgee Yes, Testnet select .

Web3Auth Network used for MPC Wallet is "sapphire_mainnet" ,"sapphire_devnet" Since you are testing use sapphire_devnet as the network in your code and the environment in the Dashboard.

@vjgee i select my code sapphire_devnet.

 const coreKitInstance = new Web3AuthMPCCoreKit({
        web3AuthClientId: env.NEXT_PUBLIC_WEB3AUTH_CLIENTID,
        web3AuthNetwork: WEB3AUTH_NETWORK.DEVNET,
        uxMode: "popup",
      })
      await coreKitInstance.init()

Have you followed this guide when implementing?:

@vjgee yes.
my code with MPC core kit SDK below.

  const login = async () => {
    try {
      setIsLoading(true)

      const coreKitInstance = new Web3AuthMPCCoreKit({
        web3AuthClientId: env.NEXT_PUBLIC_WEB3AUTH_CLIENTID,
        web3AuthNetwork: WEB3AUTH_NETWORK.DEVNET,
        uxMode: "popup",
      })
      await coreKitInstance.init()

      const provider = await coreKitInstance.connect({
        subVerifierDetails: {
          typeOfLogin: "google",
          verifier: "new-blokc-verifier",
          clientId: env.NEXT_PUBLIC_GOOGLE_ID,
        },
      })
      //google - tkey - w3a
      if (provider === null) {
        throw new Error("Failed to login: provider is null")
      }
      const userdata = coreKitInstance.getUserInfo()
      //console.log("userdata", userdata)
      localStorage.setItem("profile", userdata?.profileImage)
      // eslint-disable-next-line @typescript-eslint/no-unsafe-call
      setWallet(userdata)
      setWeb3AuthSigner(provider)
      localStorage.setItem("userRole", selectedOption)
      router.push(Routes.wallet.root)
    } catch (error) {
      console.error(error)
    } finally {
      setIsLoading(false)
    }
  }

I have forwarded your issue to our Dev team and will get back once there is a meaningful update to share. In the meantime, can you specify if this is only happening with Google login or other social logins as well?

Thanks for your understanding.

@vjgee Okay,

Looking forward to any updates from your Dev team.
Thank You .

Hi @limbachiyachintan500
This error occurs because the number of factor keys is not met.
To know how to deal with this issue, check our guide docs and example application please

1 Like

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