When using our own authentication infrastructure (OIDC: Authorization Code Flow), which SDK should we choose?

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

  • SDK Version: 5.1.0
  • Platform: hosts the web3auth-SDK
  • Browser Console Screenshots:
  • Related to Custom Authentication? Please provide the following info too: (Optional)
    • Verifier Name: custom-sinhto-testnet
    • JWKS Endpoint: jwks endpoint
    • Sample idToken(JWT)

Please provide the Web3Auth initialization and login code snippet below:

useEffect(() => {
    const init = async () => {
      try {
        const web3auth = new Web3AuthNoModal({
          chainConfig: {
            chainNamespace: CHAIN_NAMESPACES.EIP155,
            chainId: "0x13881",
          web3AuthNetwork: "testnet",
          useCoreKitKey: false,

        const openloginAdapter = new OpenloginAdapter({
          adapterSettings: {
            uxMode: "popup",
            loginConfig: {
              jwt: {
                verifier: "custom-sinhto-testnet",
                typeOfLogin: "jwt",

        await web3auth.init();
        if (web3auth.provider) {
      } catch (error) {

  }, []);

We are considering using our own authentication infrastructure to create a torus wallet.

We are trying to adjust the parameters while referencing Auth0’s SDK.

Own authentication infrastructure β†’ redirect to backend server & get id token β†’ redirect to frontend with id token β†’ web3auth.connectTo

const web3authProvider = await web3auth.connectTo(
        loginProvider: "jwt",
        extraLoginOptions: {
          verifierIdField: "sub",
          id_token: query.get("token"),  // Query parameter when redirecting
          domain: "https://auth-dev.su-pay.jp"

Is our understanding correct that we want to achieve the flow described above?

and I get the following error

Hi @ogawara_naoki,

Upon examining the details, I have identified several issues that need to be addressed:

  1. The algorithm used in the JWKS is PS256, whereas the provided token sample uses HS256.
  2. The kid field is absent in the id_token.
  3. The aud field is currently an array, and it needs to be changed to a string.

Please let me know if you have any further questions or concerns regarding this issue.

As a result of addressing points 1 and 2, the view successfully switched to loggedInView.
We plan to continue trying to create a Torus Wallet.
If we encounter any issues, we will ask for your help again.
Thank you!

1 Like