Client secrets should not be stored in public client applications. To learn more, read Confidential and Public Applications.
New secrets may be delayed up to thirty seconds while rotating. To minimize downtime, we suggest you store the new client secret in your application’s code/system configuration as a fallback to the previous secret. This way, if the client application request doesn’t work with the old secret, your app will use the new secret.Secrets can be stored in a list (or similar structure) until they’re no longer needed. Once you’re sure that an old secret is obsolete, you can remove its value from your app’s code.
Use the Dashboard
-
In the Auth0 Dashboard, go to Applications > Applications, and then select the name of the application to view.
- Scroll to the bottom of the Settings page, locate the Danger Zone, select Rotate, and confirm.
- Scroll to the top of the page, and switch to the Credentials tab.
-
View your new secret by locating Client Secret, and selecting the eye icon.
- Update authorized applications with the new value.
Use the Management API
-
Call the Management API Rotate a client secret endpoint. Replace the
YOUR_CLIENT_ID
andMGMT_API_ACCESS_TOKEN
placeholder values with your client ID and Management API access token, respectively.Value Description YOUR_CLIENT_ID
Τhe ID of the application to be updated. MGMT_API_ACCESS_TOKEN
Access Tokens for the Management API with the scope update:client_keys
. - Update authorized applications with the new value.