access_token
) is an opaque string representing an authorization issued to the application. It may denote an identifier used to retrieve the authorization information or may self-contain the authorization information (for example, the user’s identity, permissions, and so forth) in a verifiable manner.It is quite common for Access Tokens to be implemented as JSON Web Tokens.For more information on Auth0 Access Tokens refer to Access Token.scope
claim.
Subsequently, when the client passes along the Access Token when making requests to the API, the API can inspect the scope
claim to ensure that the required permissions were granted in order to call the particular API endpoint.
read:timesheets
), creating timesheets (scope create:timesheets
), deleting timesheets (scope delete:timesheets
) and approving timesheets (scope approve:timesheets
).When a client asks the API to create a new timesheet entry, then the Access Token should contain the create:timesheets
scope. In a similar fashion, in order to delete existing timesheets, the Access Token should contain the delete:timesheets
scope.For more information on scopes refer to Scopes.authorization_code
returned by Auth0 and exchange it for an Access Token (and possibly a Refresh Token).
The Proof Key for Code Exchange (PKCE) (defined in RFC 7636) is a technique used to mitigate this authorization code interception attack.
With PKCE, the Application creates, for every authorization request, a cryptographically random key called code_verifier
and its transformed value called code_challenge
, which is sent to Auth0 to get the authorization_code
. When the Application receives the authorization_code
, it will send the code and the code_verifier
to Auth0’s to exchange them for the requested tokens.
code_challenge
and code_challenge_method
parameters.authorization_code
in the query string.authorization_code
and code_verifier
together with the redirect_uri
and the client_id
to Auth0. This is done using the /oauth/token endpoint.