event
object within an Action, your changes will be available in tokens after all Actions have finished running.
org_id
claim available by default in ID and access tokens. However, you can configure your tenant to also support the use of organization names in the Authentication API. This results in tokens containing both the org_id
and org_name
claims. If present, validate the org_name
claim in addition to org_id
to ensure the received values correspond to a trusted entity.In general, using organization IDs is the preferred method for validating tokens. However, organization names can be used if they are more appropriate for your use case. To understand the potential implications of using organization names to validate tokens, review Use Organization Names in Authentication API./authorize
request by validating the org_id
claim in the same way that other claims like exp
and nonce
are validated.
To learn more, read:
org_id
claim in the ID token. Using the Auth0 SPA SDK, this can be retrieved as follows:
const { org_id } = await client.getIdTokenClaims();
org_id
claim with the ID of the organization to which the user logged in.
This can be validated along with the other claims on the backend, as in the following example for Ruby:
.auth0.com
. For example, if your tenant name were travel0
, your Auth0 domain name would be travel0.us.auth0.com
. (If your tenant were in the US and created before June 2020, then your domain name would be https://travel0.auth0.com
.)If you are using custom domains, this should be your custom domain name.