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

Problem statement

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

Error: secretOrPrivateKey must be an asymmetric key when using RS256

We tried finding our private key in the Dashboard as well but could not find it.

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: