An authorization endpoint is the identity or authorization service URL where a client begins user authentication and authorization. In an OIDC flow, the API redirects the user there; after successful login and consent, the provider redirects back with an authorization code. section 8.4.1 section 8.7
Figure 8.3 Flow of requests involved in obtaining an access token. The process begins with the user visiting the server’s login page. The API redirects the client to Auth0’s login screen, where the user authenticates and grants consent; then the user is redirected back to the API with the authorization code, which is finally exchanged for an access token.
The flow connects the client’s login route, the provider’s authorization screen, the returned authorization code, and the later token exchange. section 8.4.1
Construct the authorization request with the values that identify the intended flow:
- Use the authorization_endpoint value returned by the provider’s discovery endpoint. section 8.4.1
- Set response_type to code for an authorization-code response, and include the client_id. section 8.4.1
- Specify the audience when several APIs exist and the redirect_uri when several redirect URIs are configured. section 8.4.1
FastAPI login route
A GET /login route redirects the browser to https://apithreats.eu.auth0.com/authorize with response_type=code, a configured client_id, redirect_uri, and audience. The provider later returns a code, which the server exchanges with the client secret for an access token. section 8.4.1


