You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/server.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ Instantiates `OAuth2Server` using the supplied model.
44
44
|[options.alwaysIssueNewRefreshToken]| <code>boolean</code> | <code>true</code> | Always revoke the used refresh token and issue a new one for the `refresh_token` grant. |
45
45
|[options.extendedGrantTypes]| <code>object</code> | <code>object</code> | Additional supported grant types. |
46
46
|[options.enablePlainPKCE]| <code>boolean</code> | <code>false</code> | Allow the use of the `plain` code challenge method for PKCE. This is not recommended for production environments. |
47
+
|[options.requirePKCE]| <code>boolean</code> | <code>false</code> | Require PKCE for the `authorization_code` grant: `authorize` rejects requests without a `code_challenge`, and the token exchange rejects authorization codes that were issued without one. Recommended by OAuth 2.1. |
Copy file name to clipboardExpand all lines: lib/server.js
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ class OAuth2Server {
44
44
* @param [options.alwaysIssueNewRefreshToken=true] {boolean=} Always revoke the used refresh token and issue a new one for the `refresh_token` grant.
45
45
* @param [options.extendedGrantTypes=object] {object} Additional supported grant types.
46
46
* @param [options.enablePlainPKCE=false] {boolean} Allow the use of the `plain` code challenge method for PKCE. This is not recommended for production environments.
47
+
* @param [options.requirePKCE=false] {boolean} Require PKCE for the `authorization_code` grant: `authorize` rejects requests without a `code_challenge`, and the token exchange rejects authorization codes that were issued without one. Recommended by OAuth 2.1.
47
48
*
48
49
* @throws {InvalidArgumentError} if the model is missing
49
50
* @return {OAuth2Server} A new `OAuth2Server` instance.
0 commit comments