11# Best Practices {#recommendations}
22
33This section describes the core set of security mechanisms and measures the
4- OAuth working group considers best practices at the time of writing. Details
4+ OAuth working group considers to be best practices at the time of writing. Details
55about these security mechanisms and measures (including detailed attack
66descriptions) and requirements for less commonly used options are provided in
77(#attacks_and_mitigations).
@@ -10,13 +10,13 @@ descriptions) and requirements for less commonly used options are provided in
1010
1111When comparing client redirect URIs against pre-registered URIs, authorization
1212servers MUST utilize exact string matching except for port numbers in
13- ` localhost ` redirection URIs of native apps, see ( #iuv_countermeasures). This
13+ ` localhost ` redirection URIs of native apps ( see #iuv_countermeasures). This
1414measure contributes to the prevention of leakage of authorization codes and
1515access tokens (see (#insufficient_uri_validation)). It can also help to detect
1616mix-up attacks (see (#mix_up)).
1717
1818Clients and authorization servers MUST NOT expose URLs that forward the user's browser to
19- arbitrary URIs obtained from a query parameter (open redirector ) as
19+ arbitrary URIs obtained from a query parameter (open redirectors ) as
2020described in (#open_redirection). Open redirectors can enable
2121exfiltration of authorization codes and access tokens.
2222
@@ -122,10 +122,10 @@ access tokens in the authorization response, unless access token injection
122122in the authorization response is prevented and the aforementioned token leakage
123123vectors are mitigated.
124124
125- Clients SHOULD instead use the response type " code" (aka authorization
125+ Clients SHOULD instead use the response type ` code ` (i.e., authorization
126126code grant type) as specified in (#ac) or any other response type that
127127causes the authorization server to issue access tokens in the token
128- response, such as the " code id \_ token" response type. This allows the
128+ response, such as the ` code id_token ` response type. This allows the
129129authorization server to detect replay attempts by attackers and
130130generally reduces the attack surface since access tokens are not
131131exposed in URLs. It also allows the authorization server to
@@ -251,5 +251,5 @@ To support browser-based clients, endpoints directly accessed by such clients
251251including the Token Endpoint, Authorization Server Metadata Endpoint, ` jwks_uri `
252252Endpoint, and the Dynamic Client Registration Endpoint MAY support the use of
253253Cross-Origin Resource Sharing (CORS, [ @WHATWG .CORS] ). However, CORS MUST NOT be
254- supported at the Authorization Endpoint as the client does not access this
255- endpoint directly, instead, the client redirects the user agent to it.
254+ supported at the Authorization Endpoint, as the client does not access this
255+ endpoint directly; instead, the client redirects the user agent to it.
0 commit comments