Verifier not supported error

I had previously implemented SFA with Custom Auth and it was working fine.

When I created a new Custom Verifier on the new Dashboard, the new Verifier did not pass authentication and gave me an error. Error: Verifier not supported

When I had a similar error before, it was due to a different web3AuthNetwork in the new Web3Auth parameter, so I am wondering if this is the cause of the error again.
At first, I was able to create it with mainnet, but from the middle of the process, I was only able to select Aqua, and this time it is Sapphire.

Does anyone have any idea what the cause might be?

Please provide the following details too when asking for help in this category:

  • SDK Version: 7.0.1
  • Verifier Details:
    • Verifier Name: p-0001
    • JWKS Endpoint: https://api.line.me/oauth2/v2.1/certs
    • Sample idToken(JWT): paste decoded information because JWT include my personal profile.
      {
      “iss”: “https://access.line.me”,
      “sub”: “U5e8175906325241eb3001d2b159742b4”,
      “aud”: “2000310947”,
      “exp”: 1695291362,
      “iat”: 1695287762,
      “amr”: [
      “linesso”
      ]
      }

@taaaaho Thanks for your patience.

Did you create the verifier from the same organization from your Dashboard? Is the verifier linked to same project?

Yes. I created a new Project, where I also created a Custom Verifier.

One thing I am wondering is that the Env is set to Sapphire Devnet, does web3AuthNetwork work with testnet when initializing Web3Auth?

const web3auth = new Web3Auth({
  clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID as string,
  web3AuthNetwork: 'testnet',
  enableLogging: true,
  usePnPKey: false,
})

This is a confirmation of a similar error I had before, where the specification here was different.

The web3AuthNetwork should be 'sapphire_devnet'

Thank you very much.
When I fixed that, I got another error the next time.
Custom. Unable to get private key from torus nodes.

Are you able to crate the verifier with environment as ‘Testnet’ instead of sapphire_devnet and the web3AuthNetwork to the same to check the behavior?

1 Like

you mean testnet is Legacy Testnet ? I’l try.

I created a project with Legacy Testnet and Verifier and checked it.

The result is the same as sapphire_devnet.
In case of web3AuthNetwork: ‘sapphire_devnet’, Verifier not supported error is displayed, and in case of web3AuthNetwork: ‘testnet’, wallet generation itself works fine.

The error seems to be in the part of my application where the private key is retrieved after the wallet is generated, but I wonder if the method of retrieving the private key has changed.

If the user has not enabled MFA, we use the @web3auth/single-factor-auth sdk to retrieve the private key shares from the Web3Auth auth network nodes and reconstruct the private key.

My account is not MFA enabled, but it doesn’t seem to work. I stated earlier that the wallet was created, but it seems to be an error in the connect portion of the process.

Is there any other perspective to check?

const web3authProvider = await web3auth.connect({
    verifier: verifier,
    verifierId: sub,
    idToken: idToken!
  })

What is the response you receive? Is there any error? Can you share console logs?

Error occured, and message is Custom. Unable to get private key from torus nodes.

I have forwarded your issue to our Dev team and we will get back further updates.

1 Like

It is possible that you might be using different client id.

So, testnet verifier should use testnet project id and same for all network

I use this project client id and custom authentication.
so I think project and network is correct.


@vjgee
I send you error logs.

@vjgee
Additional Information

Looking at the contents of the log in the above capture (presumably the log produced by Lib), it seems that privkey corresponds to the private key, and I was able to actually load the wallet by importing this one.

Therefore, it seems that torus is able to generate the pkey, but an error is occurring when it gets the pkey to the web3auth side.

Hi @taaaaho, could you please create a new custom verifier using this guide. This has been our go-to guide which has solved a lot of issues with custom verifiers.
Please don’t forget to change the client id if you create the verifier with another project. And also the network you’re creating the verifiers on.

Hi @maharshi , thank you for your advice.
In the case of custom authentication, does single-factor-auth not work?
It would be helpful for existing customers to be able to use the same code that worked with single-factor-auth before the change to the new structure.

I have also tried the code you mentioned, but I get the following error

WalletInitializationError: Wallet is not found, Please add wallet adapter for openlogin wallet, before connecting
    at WalletInitializationError.fromCode (base.esm.js:242:1)
    at WalletInitializationError.notFound (base.esm.js:248:1)
    at Web3AuthNoModal.connectTo (noModal.esm.js:117:77)
    at initWeb3Auth (useWeb3Auth.ts:111:47)
    at startWeb3AuthForCreateWallet (_app.tsx:64:31)

The sample code does not use an openLoginAdapter instance after it is created, is this correct?

const openloginAdapter = new OpenloginAdapter({
  adapterSettings: {
    uxMode: "redirect", // redirect or popup
    loginConfig: {
      jwt: {
        verifier: "verifier-name", // name of the verifier created on Web3Auth Dashboard
        typeOfLogin: "jwt",
        clientId: "", // Web3Auth Client ID
      },
    },
  },
  privateKeyProvider,
});

await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
  loginProvider: "jwt",
  extraLoginOptions: {
    id_token: "YOUR_GENERATED_ID_TOKEN",
    verifierIdField: "sub", // sub, email, or custom
  },
});
....
1 Like

Hi @taaaaho, custom authentication works like a breeze with SFA web. I’ll link an example here that I have personally created.