Auth0 recommends that you execute signing key rotation on a development tenant first, then verify that your applications and APIs still work as expected. After you verify that everything is working properly, perform the same signing key rotation on your production tenant.
To allow you time to update your application with the new signing key, all tokens signed with the previous key will still be valid until you revoke the previous key. To learn more, read Revoke Signing Keys.
Use the Dashboard
-
Go to Dashboard > Settings > Signing Keys.
- Under Rotation Settings, locate Rotate Signing Key, and select Rotate Key.
-
Click Rotate to confirm.
Use the Management API
-
To get a list of the signing keys, make a
GET
call to the Get all Application Signing Keys endpoint. -
To rotate the signing key, make a
POST
call to the Rotate the Application Signing Key endpoint. Be sure to replace theMGMT_API_ACCESS_TOKEN
placeholder value with your Management API access token.
Value | Description |
---|---|
MGMT_API_ACCESS_TOKEN | Access Token for the Management API with the scopes create:signing_keys and update:signing_keys . |
Key rotation impact
APIs and API gateways accepting access tokens
Most middleware and API gateways leverage the JSON web key set (JWKS) endpoint to retrieve the current and future signing keys at a certain interval. If your middleware and/or API gateways do not support this endpoint and require you to manually configure a*.cer
file, you will need to coordinate the signing key rotation in Auth0 with the reconfiguration of your middleware and gateways.