I cannot find the documentation that lists what fields should/could be in auth_config.js and what they do. In particular I am confused about what “apiUri” and “appUri” settings do.
These exist in the Angular examples but I cannot see any explanation anywhere. Google searches did not reveal anything useful either.
Hi @seref.arikan,
Welcome to the Auth0 Community!
The API endpoint that the Angular application communicates for authentication is specifically specified in the “apiUri
” parameter. This is required for API authorization and is closely tied to the audience parameter.
This is because when a user logs in to your auth0 application, it can request an Access Token. This token can perform authorized queries to the API.
Basically, your API verifies that the access token is for the specified API by validating it. The API should handle the request if the token is validated. If not, then the Access Token will be denied.
Example:
apiUri: 'https://{{your-api-url}}.com' //This is the API you will access
In summary, apiUri
represents the API endpoints that the Angular application requires. Setting up an audience for token validation typically involves this.
Please check some of the articles and documentation referring to auth_config.js
for Angular:
- AuthConfig | @auth0/auth0-angular
- The Complete Guide to Angular User Authentication with Auth0
- GitHub - auth0-blog/auth0-angular-sample: Angular project that defines a Single-Page Application (SPA)
- Setting up Auth0 with Angular
Please let me know if this helps and if you have any follow-up questions.
Thanks,
Timotei