Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use determineTargetUrl() to retrieve redirect URL in SavedRequestAwareAuthenticationSuccessHandler #16704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuezk
Copy link
Contributor

@yuezk yuezk commented Mar 7, 2025

Problem:

The determineTargetUrl() in the subclass of the SavedRequestAwareAuthenticationSuccessHandler no longer works because the SavedRequestAwareAuthenticationSuccessHandler class overrides the onAuthenticationSuccess method and no longer respects the determineTargetUrl() method.

Use cases

We have a class that extends the SavedRequestAwareAuthenticationSuccessHandler because we want it to redirect to some specific URLs in some cases and use the saved request for others. Override the determineTargetUrl() could be an ideal solution, but the SavedRequestAwareAuthenticationSuccessHandler breaks it.

@yuezk yuezk force-pushed the polish_SavedRequestAwareAuthenticationSuccessHandler branch from aa86c76 to 3f10bbd Compare March 7, 2025 09:40
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 7, 2025
@yuezk yuezk force-pushed the polish_SavedRequestAwareAuthenticationSuccessHandler branch from 3f10bbd to 070bb51 Compare March 7, 2025 12:14
@yuezk yuezk changed the title Use determineTargetUrl() to retrieve redirect URL Use determineTargetUrl() to retrieve redirect URL in SavedRequestAwareAuthenticationSuccessHandler Mar 12, 2025
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.

2 participants