You should generate a separate key pair for each type of credential usage. For example, do not reuse the same key pairs for both JAR and Private Key JWT Authentication.
- Generate a private key and a public key in PEM. You should safeguard the private key and never share it, not even with Auth0:
openssl genrsa -out test_key.pem 2048
- Extract the public key in PEM format using the following command. This command extracts the public key details so it can be safely shared without revealing the details of the private key:
openssl rsa -in test_key.pem -outform PEM -pubout -out test_key.pem.pub
The example below shows the contents of the test_key.pem.pub
PEM file:
- Save the PEM file. You will need the key contents in other application configuration steps.