Skip to content

OAuth2Login behaves differently in MVC and Reactive #16941

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

Open
joaquinjsb opened this issue Apr 15, 2025 · 0 comments
Open

OAuth2Login behaves differently in MVC and Reactive #16941

joaquinjsb opened this issue Apr 15, 2025 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@joaquinjsb
Copy link
Contributor

Expected Behavior

When switching between MVC and Reactive variants, the behavior of the oauth2login should likely be the same, when using token relay with Spring Cloud Gateway.

Current Behavior

the DefaultOAuth2AuthorizationRequestResolver doesn't alter the defaultAction when the client grant is authorization code, the reactive stack changes the action urimap variable.
Context

if (AuthorizationGrantType.AUTHORIZATION_CODE.equals(clientRegistration.getAuthorizationGrantType())) {
action = "login";
}

so when I'm using my tokenRelay in reactive spring cloud gateway, everything works as expected, but when working with MVC, the generated url, which starts here

generates an "invalid" URL, because the code doesn't interfere:

when calling "authorize" signature generates this url:
/authorize/oauth2/code/{registrationId}......
while calling "login" generates a "valid" one:
/login/oauth2/code/{registrationId}....

*of course modifying manually the redirect-uri of the client solves the issue, but would be nice if the behavior is
valid

@joaquinjsb joaquinjsb added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Apr 15, 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 type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant