app_metadata
associated with a user and a Rule defined in your Auth0 tenant.app_metadata
on a user in your Auth0 tenant with the enforcement process performed in the application or API itself. In this scenario, the data is typically communicated as one or more custom claims in an id
or access
token.id
or access
token may be consumed with or without data from an external source that is not Auth0.UnauthorizedError
when, for example, a user attempts access to an application or an API at an incorrect time (as described in this example) - or if the user doesn’t have the right claim(s) contained in their app_metadata
. For an application using OpenID Connect (OIDC), this would prevent the allocation of the ID Token used to authorize access. Similarly, for an API, allocation of any OAuth2 Access Token (used when calling the API), could be prevented as described in this example.
app_metadata
. Firstly, this prevents you from needing to call an external API to fetch the data, which can negatively impact the performance and scalability of the login sequence. Secondly app_metadata
cannot be modified by a user - so the user cannot directly circumvent any access control restrictions by modifying their own metadata. Also remember to check out our metadata best practices guidance too.
localhost
then Auth0 cannot verify that the application is truly a first-party app so your users will be prompted for consent anyway. To work around this constraint, when testing on your local machine during development, create a fake local hostname and use that instead.app_metadata
. Firstly, this prevents you from needing to call an external API to fetch the data, which can negatively impact performance and scalability. Secondly app_metadata
cannot be modified by a user - so the user cannot directly circumvent any access control restrictions by modifying their own metadata. Also remember to check out our metadata best practices guidance too.
editor
or admin
manager
for a user or marketing
for an object