Skip to content

Add authenticationSuccessHandler for OAuth2 auth code callback#18814

Open
wonderfulrosemari wants to merge 1 commit intospring-projects:mainfrom
wonderfulrosemari:gh-11069-oauth2-forward-redirect-strategy
Open

Add authenticationSuccessHandler for OAuth2 auth code callback#18814
wonderfulrosemari wants to merge 1 commit intospring-projects:mainfrom
wonderfulrosemari:gh-11069-oauth2-forward-redirect-strategy

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

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable forward request (like ForwardSuccessHandler) in OAuth2AuthorizationCodeGrantFilter

2 participants