Add authenticationSuccessHandler for OAuth2 auth code callback by wonderfulrosemari · Pull Request #18814 · spring-projects/spring-security

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@wonderfulrosemari

Copy link

Contributor

Closes gh-11069

This PR adds support for configuring a custom AuthenticationSuccessHandler
for the OAuth2 authorization code callback filter.

Changes include:

  • adding setAuthenticationSuccessHandler(...) to OAuth2AuthorizationCodeGrantFilter
  • invoking the custom success handler after saving the authorized client
  • preserving existing redirect behavior when no custom success handler is configured
  • adding tests for null validation and custom success handler invocation
  • exposing the customization through OAuth2ClientConfigurer.AuthorizationCodeGrantConfigurer
  • adding config tests to verify DSL wiring
Signed-off-by: wonderfulrosemari <whwlsgur1419@naver.com>

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage

An issue we've not yet triaged

label

Feb 27, 2026

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

Reviewers

No reviews

Assignees

No one assigned

Labels

status: waiting-for-triage

An issue we've not yet triaged

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enable forward request (like ForwardSuccessHandler) in OAuth2AuthorizationCodeGrantFilter

2 participants

@wonderfulrosemari @spring-projects-issues