Reading Notes for Codefellows
### cited below
Auth0’s SDK creates a cryptographically-random code_verifier and from this generates a code_challenge.
Auth0’s SDK redirects the user to the Auth0 Authorization Server (/authorize endpoint) along with the code_challenge.
Your Auth0 Authorization Server redirects the user to the login and authorization prompt.
The user authenticates using one of the configured login options and may see a consent page listing the permissions Auth0 will give to the application.
Your Auth0 Authorization Server stores the code_challenge and redirects the user back to the application with an authorization code, which is good for one use.
Auth0’s SDK sends this code and the code_verifier (created in step 2) to the Auth0 Authorization Server (/oauth/token endpoint).
Your Auth0 Authorization Server verifies the code_challenge and code_verifier.
Your Auth0 Authorization Server responds with an ID Token and Access Token (and optionally, a Refresh Token).
Your application can use the Access Token to call an API to access information about the user.
Auth0’s SDK redirects the user to the Auth0 Authorization Server (/authorize endpoint) passing along a response_type parameter of id_token that indicates the type of requested credential. It also passes along a response_mode parameter of form_post to ensure security.
Your Auth0 Authorization Server redirects the user to the login and authorization prompt.
The user authenticates using one of the configured login options and may see a consent page listing the permissions Auth0 will give to the app.
Your Auth0 Authorization Server redirects the user back to the app with an ID Token.
Your Auth0 Authorization Server validates the Client ID and Client Secret.
Your Auth0 Authorization Server responds with an Access Token.
Your application can use the Access Token to call an API on behalf of itself.
The API responds with requested data.
The device app requests authorization from the Auth0 Authorization Server using its Client ID (/oauth/device/code endpoint).
The Auth0 Authorization Server responds with a device_code, user_code, verification_uri, verification_uri_complete expires_in (lifetime in seconds for device_code and user_code), and polling interval.
The device app asks the user to activate using their computer or smartphone. The app may accomplish this by:
asking the user to visit the verification_uri and enter the user_code after displaying these values on-screen
asking the user to interact with either a QR Code or shortened URL with embedded user code generated from the verification_uri_complete
directly navigating to the verification page with embedded user code using verification_uri_complete, if running natively on a browser-based device
The device app begins polling your Auth0 Authorization Server for an Access Token (/oauth/token endpoint) using the time period specified by interval and counting from receipt of the last polling request’s response. The device app continues polling until either the user completes the browser flow path or the user code expires.
When the user successfully completes the browser flow path, your Auth0 Authorization Server responds with an Access Token (and optionally, a Refresh Token). The device app should now forget its device_code because it will expire.
Your device app can use the Access Token to call an API to access information about the user.
The API responds with requested data.
Your application forwards the user’s credentials to your Auth0 Authorization Server (/oauth/token endpoint).
Your Auth0 Authorization Server validates the credentials.
Your Auth0 Authorization Server responds with an Access Token (and optionally, a Refresh Token).
Your application can use the Access Token to call an API to access information about the user.
The API responds with requested data.
### cite - What is OAuth? HOw the open authorization framework works (https://www.csoonline.com/article/3216404/what-is-oauth-how-the-open-authorization-framework-works.html) - Authentication adn authorization flows (https://auth0.com/docs/flows)