Skip to content

Conversation

@bloomsei
Copy link

@bloomsei bloomsei commented Dec 13, 2025

Updates documentation to reflect that PKCE is now enabled by default for authorization_code flows in both authorization server and client.

Changes include:

  • Documenting the default PKCE behavior for authorization code flows
  • Adding instructions for disabling PKCE when not supported

The documented changes were introduced by:

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 13, 2025
@bloomsei bloomsei force-pushed the main branch 2 times, most recently from 5c9f286 to 6a085f9 Compare December 13, 2025 15:20
@jgrandja jgrandja self-assigned this Jan 22, 2026
@jgrandja jgrandja added in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 22, 2026
@jgrandja jgrandja added this to the 7.0.3 milestone Jan 22, 2026
Copy link
Contributor

@jgrandja jgrandja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates @bloomsei.

Please see review comments.

or

. When `ClientRegistration.clientSettings.requireProofKey` is `true` (in this case `ClientRegistration.authorizationGrantType` must be `authorization_code`)
. `authorization-grant-type` is set to `authorization_code` (`AuthorizationGrantType.AUTHORIZATION_CODE`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this as the current content is correct.


. `client-secret` is omitted (or empty)
. `client-authentication-method` is set to "none" (`ClientAuthenticationMethod.NONE`)
. `client-secret` is omitted (or empty) and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert as the "and" is not necessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it consistent with the documentation for servlet, but I see your point. I changed the one in servlet for consistency instead.

or

. When `ClientRegistration.clientSettings.requireProofKey` is `true` (in this case `ClientRegistration.authorizationGrantType` must be `authorization_code`)
. `authorization-grant-type` is set to `authorization_code` (`AuthorizationGrantType.AUTHORIZATION_CODE`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this as the current content is correct.

<13> `tokenSettings`: The custom settings for the OAuth2 tokens issued to the client – for example, access/refresh token time-to-live, reuse refresh tokens, and others.

[[oauth2AuthorizationServer-client-settings]]
== ClientSettings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update would need to be added in 7.1.0-M2 as it's considered an enhancement. However, I would like to get something into 7.0.3 mentioning PKCE defaults to true. Please adjust this content and feel free to submit another PR for the full ClientSettings doc and I can add it to 7.1.0-M2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Will open a separate PR to add this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a PR for this: gh-18614

Updated the documentation to reflect recent changes to enable PKCE by default for `authorization_code` flows in the documentation for both authorization_server and client.

Signed-off-by: Elayne Bloom <[email protected]>
Copy link
Author

@bloomsei bloomsei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your thoughtful review @jgrandja 🙏🏻
I have made the requested changes and will open a new PR to document the ClientSettings, like suggested.
Let me know if you have any other concerns.


. `client-secret` is omitted (or empty)
. `client-authentication-method` is set to "none" (`ClientAuthenticationMethod.NONE`)
. `client-secret` is omitted (or empty) and
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it consistent with the documentation for servlet, but I see your point. I changed the one in servlet for consistency instead.

<13> `tokenSettings`: The custom settings for the OAuth2 tokens issued to the client – for example, access/refresh token time-to-live, reuse refresh tokens, and others.

[[oauth2AuthorizationServer-client-settings]]
== ClientSettings
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Will open a separate PR to add this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants