Auth0 Tenant Maintenance Mode

Overview

This article explains whether it is possible to set a tenant to a "maintenance mode" which means the tenant will deflect all requests.

Applies To

  • Auth0 Tenants
  • Maintenance Mode

Solution

Setting a tenant to "maintenance mode" is not supported at this moment. However, Login and/or Signup requests can be denied using api.access.deny method in Actions or Tenant Access Control List.

 

NOTE: Take extra care not to accidentally lock out the tenant administrators/developers. It is recommended to conduct robust testing in a non-production environment before implementing either approach.

 

api.access.deny in Actions

For example, in a Post Login Action:

 
if(event.client.metadata.mode === "maintenance") {
  api.access.deny("Maintenance Mode")
}
 
The client_metadata can be used to flag a specific application that is in maintenance: Configure Application Metadata.

Advanced settings

NOTE:

  • It is not guaranteed that the Post-Login Action covers all the token exchange paths. There may be other paths that need to be addressed (for example, Client Credentials FlowCustom Token Exchange, etc.)
  • End users can hit the API endpoints or start a password reset process even if a Post Login Action denies the requests. The example code only denies the login request.

Tenant ACL

Creating a temporary rule in the Tenant Access Control List can prevent the end users from using Auth0 services during the maintenance window.

 

Related References

 

Recommended content

No recommended content found...