Configure Application Metadata

Application metadata is optional and consists of customizable keys and values (max 255 characters each), that you can set for each application. Metadata is exposed in the Client object as client_metadata, and in Rules as context.clientMetadata. You might store, for example, the URL for the application’s home page (a field that Auth0 doesn’t provide by default in the application settings).

Client metadata is stored as part of the application (client) properties. To learn more about data types, field names, and storage limitations, read Metadata Field Names and Data Types.

Where to store client secrets

Where to store the secret depends on the scope of the secret:

  • Is it just one secret per application? Then client_metadata would be a good place.

  • Is it the same secret for the whole system (i.e., for all applications or many)? Then the rule’s configuration values might be a better choice

  • Is it a different secret for each user? Then storing in app_metadata might be better.

Existing applications will have no value for this property.

You can access application metadata in Actions:

exports.onExecutePostLogin = async (event, api) => {
  if (event.client.metadata.SKIP_VERIFICATION === "yes"){
    return;
  }
  // ... continue this Action
}

Was this helpful?

/

... or in Rules:

function applicationMetadataExample (user, context, callback){
  context.clientMetadata = context.clientMetadata || {};
  if (context.clientMetadata.SKIP_VERIFICATION === "yes"){
    return callback();
  }
  // ... continue this Rule
}

Was this helpful?

/

You can read and add to the application metadata using either the Dashboard or the Management API. To learn how to manage client metadata with the Management API, read Manage Metadata Using the Management API.

Add application metadata key/value pairs

  1. Go to Dashboard > Applications > Applications and select the application.

  2. Scroll down and click Advanced Settings.

  3. On the Application Metadata tab, enter the key's name and value, then click Add.

    Dashboard Applications Applications Settings Tab Advanced Settings Application Metadata Tab
  4. Click Save Changes.

Update application metadata value

  1. Go to Dashboard > Applications > Applications and select the application.

  2. Scroll down and click Advanced Settings.

  3. On the Application Metadata tab, enter the key's name that you want to change and enter a new value, then click Add.

  4. Click Save Changes

Delete application metadata

  1. Go to Dashboard > Applications > Applications and select the application.

  2. Scroll down and click Advanced Settings.

  3. On the Application Metadata tab locate the key/value pair you want to delete and click the trash can icon.

  4. Confirm the deletion.

  5. Click Save Changes.

Learn more