auth0/idtoken-verifier

Can't generate a new id_token for unit testing using Auth0 secret

ctrevarthen opened this issue · 2 comments

I'm trying to add some new tests to this project via PR #9 but realized that if I want to add a passing test for a new id_token, I'll need it signed with the private key from Auth0.

Is there a way to get access to the secret key and/or could someone with access generate an RS256 signed token from the following that can be verified with the key from https://wptest.auth0.com/:

Header

{
  "typ": "JWT",
  "alg": "RS256",
  "kid": "QzE4N0ZBM0VDQzE2RUU0NzI1QzY1MzQ4QTk1MzAwMEI4RDgxNzE4Rg"
}

Payload

{
  "iss": "https://wptest.auth0.com/",
  "sub": "auth0|55d48c57d5b0ad0223c408d7",
  "aud": ["gYSNlU4YC4V1YPdqq8zPQcup6rJw1Mbt", "secondAud"],
  "exp": 1482969031,
  "iat": 1482933031,
  "nonce": "asfd"
}

Thanks!

I don't have access to this tenant. You can generate one yourself and use that instead, that's fine.

Thanks, I was able to generate my own public key and use the CacheMock to inject it when doing the jwks check in the unit tests. #9 has been updated with the updated tests.