Auth0 Home Blog Docs

KeyInfo undefined in Auth0 idtoken-verifier

auth0

#1

We’re using these auth0 dependencies on the client.

"auth0-js": "^9.0.0",
"auth0-lock": "^11.2.2",

While running our end to end tests we get intermittent failures where the keyInfo found in this block of code return undefined from the jwksCache.get(cachekey)

  } else {
    var keyInfo = this.jwksCache.get(cachekey); // eslint-disable-line vars-on-top
    cb(null, new RSAVerifier(keyInfo.modulus, keyInfo.exp));
  }

The above source code belongs to to the id-token verifier ~ line 206 -> 208. Any help as to why this is happening would be greatly appreciated.


#2

I was able to trace the root cause of this issue to Cypress (our e2e testing framework) not clearing out session storage between tests runs.