Can you access the Auth0 private key used to generate your own access tokens

Overview

The customer is trying to recreate the same access_token as you would receive from Auth0 for testing. They have tried using RS256 enc method but are seeing the following error:

Error: secretOrPrivateKey must be an asymmetric key when using RS256

They tried finding their private key in the Dashboard as well but could not find it.

Cause

*Informational*

Solution

We do not supply the private keys as we are generating the access tokens ourselves from Auth0 on our side and it is not possible to recreate the same access_token as you would receive from Auth0.

If you would like to generate a custom access_token, this would be a 3rd party token and you would need to generate a private key for that yourself. Here is an example:
https://stackoverflow.com/questions/38794670/how-to-sign-a-jwt-using-rs256-with-rsa-private-key

Recommended content

No recommended content found...