Error connecting to Web3Auth: Error: Error occurred while verifying params timesigned is more than 1m0s ago 2024-02-15 05:19:45 +0000 UTC

  • Verifier Name: bowled-custom-test
  • JWKS Endpoint: https://dev.bowled.io/bowled-user-ms/api/jwks/get
  • Sample idToken (JWT):“eyJraWQiOiI1NjgxYzRmOC1jZTFlLTQ1MGEtODNhOC02ZDFlZjYzMGU5YmQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0NiIsImV4cCI6MTcwODQwNjMyNSwiaWF0IjoxNzA3OTc0Mzg1fQ.TAa1ingBZq8claCr6s05Q_NpKGqEDtL5ffi2VLKha5naSThiDodWLyHLSyjfZmQ3jaaSAPhlHXiTU-JYuvCtW282X7BDlwtfmxwhrprxKywKk6Mi-0-RUgUm4Y1LEh4GhVcWCkywgR17PUSlyHDWeZ6u7ET_Yqwwm1AL75LPi9KGXR7K-jVw7ImBh23CDunyegqEh-fgkj-wRtQAu70IQiITeYLor75uDjWzo1KijToiaaa8ysyidpeGxBsZu2K9aXtGKdvuyZZhVnX3KcX9QvtJQuHh4N9Uvg_9pBG_dnZBO7lwbYlbjsRUfOjYiooIrW5yBNR-rWxOxsOSUG5amg”
web3auth.init({ provider: privateKeyProvider });

const connect = async () => {
  try {
    const web3authNodeprovider = await web3auth.connect({
      verifier: "bowled-custom-test", // e.g. `web3auth-sfa-verifier` replace with your verifier name, and it has to be on the same network passed in init().
      verifierId: "46", // e.g. `Yux1873xnibdui` or `name@email.com` replace with your verifier id(sub or email)'s value.
      idToken:
        "eyJraWQiOiI1NjgxYzRmOC1jZTFlLTQ1MGEtODNhOC02ZDFlZjYzMGU5YmQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0NiIsImV4cCI6MTcwODQwNjMyNSwiaWF0IjoxNzA3OTc0Mzg1fQ.TAa1ingBZq8claCr6s05Q_NpKGqEDtL5ffi2VLKha5naSThiDodWLyHLSyjfZmQ3jaaSAPhlHXiTU-JYuvCtW282X7BDlwtfmxwhrprxKywKk6Mi-0-RUgUm4Y1LEh4GhVcWCkywgR17PUSlyHDWeZ6u7ET_Yqwwm1AL75LPi9KGXR7K-jVw7ImBh23CDunyegqEh-fgkj-wRtQAu70IQiITeYLor75uDjWzo1KijToiaaa8ysyidpeGxBsZu2K9aXtGKdvuyZZhVnX3KcX9QvtJQuHh4N9Uvg_9pBG_dnZBO7lwbYlbjsRUfOjYiooIrW5yBNR-rWxOxsOSUG5amg",
    });
    const ethPrivateKey = await web3authNodeprovider.request({
      method: "eth_private_key",
    });
    // The private key returned here is the CoreKitKey
    console.log("ETH Private Key", ethPrivateKey);
  } catch (error) {
    console.error("Error connecting to Web3Auth:", error);
  }
};
connect();

@sheikh Welcome Aboard!

“Error occurred while verifying paramstimesigned is more than 1m0s ago 2022-02-24 13:46:05 +0000 UTC” error could be because:

  • JWT is expired.
  • The JWT’s exp field is less than the current time.
  • The JWT’s iat field is greater than 60s from current time.

Please generate a new token.

I also noticed, * The kid present in the JWT header is not present in the JWKS.

Kid is there in jwks.you see the json

It does not match is what I meant:

The headers show the kid below:

The JWKS shows the kid as 8d50d20d-f2a6-4da5-80aa-8b15e13f0447

@sheikh Did you fix the Kid mismatch and generate a fresh token?