Error occurred while verifying params unable to verify jwt token - Failed to verify JWS signature

Error occurred while verifying params unable to verify jwt token

“Error occurred while verifying params unable to verify jwt token” error could be because of the following reasons:

  • The verifier for your OpenLoginAdapter might be wrong. Check to make sure the verifier field is set correctly.
  • The JWT is not signed with the correct key(JWK).
  • The JWKS endpoint is not reachable or doesn’t return a valid JWK that was used to sign the JWT.
  • The JWKS endpoint is incorrect on the Web3Auth Dashboard. Double-check to confirm the correct JWKS endpoint.
  • The JWKS is missing the kid field.
  • The kid present in the JWT header is not present in the JWKS.

sample jwks:

{
  "keys": [
    {
      "kty": "RSA",
      "e": "AQAB",
      "use": "sig",
      "kid": "YOUR-KID", // <-- This is the kid.
      "n": "YOUR-N",
      "alg": "RS256" // <-- This is the algorithm.
    }
  ]
}

sample jwks endpoint: https://www.googleapis.com/oauth2/v3/certs