Build and Secure a FastAPI Server with Auth0

Hi @jy1, sorry for the delayed response. Let me try to clarify the different configuration variables, as it is skipped in the article (I’ll correct that later).

AUTH0_DOMAIN

This is the tenant domain and it can be found in your Tenant’s settings or in any application settings page.

AUTH0_ISSUER

This represents the URI under which Auth0 issued the token, commonly is the base URL of your domain, hence https://<your-domain>/, so for example, if your tenant’s domain is: abc.auth0.com, your issuer would be https://abc.auth0.com/.

AUTH0_API_AUDIENCE

This parameters defines the intended consumer of the token, which in this case, is the API. You define the audience when creating your API on the Auth0 dashboard.

Here is a video that explains audience in detail:

AUTH0_ALGORITHMS

When you create an API in the Auth0 dashboard, you can specify the Signing Algorithm, which uses RS256 by default, though you could opt to use HS256 instead. You should specify in this field the same algorithm you have chosen for your API.

Hope this helps, let me know if you have any further questions.

Thanks

1 Like