Can't connect with Node.js: SomeError: Unable to resolve enough promises

I’m also refering to the post below, but since it was not with node.js I am creating a new post.

I created a Custom Authentication with JWT as custom provider and using the Unity jwks endpoint to validate the access token received after the player has identifier in the front end with Unity.

https://player-auth.services.api.unity.com/.well-known/jwks.json

async function ConnectToSolana(verifierId, idToken) {

    const web3auth = new Web3Auth({
        clientId: CLIENT_API, // Get your Client ID from Web3Auth Dashboard
        web3AuthNetwork: "sapphire_devnet", // Get your Network from Web3Auth Dashboard
    });

    const solanaProvider = new SolanaPrivateKeyProvider({
        config: {
            chainConfig: {
                chainNamespace: CHAIN_NAMESPACES.SOLANA,
                chainId: "0x1", // Please use 0x1 for Mainnet, 0x2 for Testnet, 0x3 for Devnet
                rpcTarget: myRPC,
                wsTarget: "",
                displayName: "Solana Mainnet",
                blockExplorer: "https://explorer.solana.com",
                ticker: "SOL",
                tickerName: "Solana",
                decimals: 9,
            },
        },
    });

    await web3auth.init({ provider: solanaProvider });

    const web3authNodeprovider = await web3auth.connect({
        verifier: "solcraft-auth-jwt", // e.g. `web3auth-sfa-verifier` replace with your verifier name, and it has to be on the same network passed in init().
        verifierId: verifierId, // e.g. `Yux1873xnibdui` or `name@email.com` replace with your verifier id(sub or email)'s value.
        idToken: idToken, // or replace it with your newly created unused JWT Token you get from your auth provider.
    });

Here is a sample of the JWT

{2 items
"header":{3 items
"alg":"RS256"
"kid":"public:A3C371BF-8BE4-471B-BC60-283EA6152EB1"
"typ":"JWT"
}
"payload":{12 items
"aud":[4 items
0:"idd:119bae23-e612-419a-99e8-fba34bd752da"
1:"envName:production"
2:"envId:7e51708e-55ed-4108-a4bf-086b543c310f"
3:"upid:ecd38980-e769-41a3-818f-e55696f6de63"
]
"exp":1698546029
"iat":1698542429
"idd":"119bae23-e612-419a-99e8-fba34bd752da"
"iss":"https://player-auth.services.api.unity.com"
"jti":"48fa64c2-7124-4322-846b-dcea0107c6b6"
"nbf":1698542429
"project_id":"ecd38980-e769-41a3-818f-e55696f6de63"
"sign_in_provider":"oidc-google"
"sub": sub
"token_type":"authentication"
"version":"1"
}
}

I’m using “@web3auth/node-sdk”: “^3.1.0”,

The error message is the following , I replace the actual sub by “sub” as it’s a unique identifier that should not be shared. I tried the same method using the Web3Auth token received after having signed in the user with Web3Auth with the same result. I could really need some help on this.

App 15150 output: /home/giljowal/nodevenv/solcraft-alpha/16/lib/node_modules/@toruslabs/torus.js/dist/torusUtils.cjs.js:642
App 15150 output:             reject(new SomeError({
App 15150 output:                    ^
App 15150 output: SomeError: Unable to resolve enough promises.
App 15150 output:     at /home/giljowal/nodevenv/solcraft-alpha/16/lib/node_modules/@toruslabs/torus.js/dist/torusUtils.cjs.js:642:20
App 15150 output:     at <anonymous> {
App 15150 output:   errors: [ undefined, undefined, undefined, undefined, undefined ],
App 15150 output:   responses: [ undefined, undefined, undefined, undefined, undefined ],
App 15150 output:   predicate: 'invalid public key result: [null,null,null,null,null] and nonce result:{} for verifier: solcraft-auth-jwt, verifierId: sub and extendedVerifierId: undefined '
App 15150 output: }

@gillesjo.walther Thanks for reporting.

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