Baeldung / spring-security-oauth

Getting Started withg Spring Security OAuth:
http://bit.ly/github-lsso
MIT License
1.99k stars 1.95k forks source link

Redirection to "/" instead of the requested endpoint after successful login. #283

Closed Javs95 closed 2 years ago

Javs95 commented 2 years ago

Not much to say, after a successful login the auth server does not redirects to the requested endpoint, it shows "/" instead. I've seen many differences between the tutorial and the source code, but even making both versions, got the same result.

kwoyke commented 2 years ago

Hi @Javs95 , We'll take a look into this.

kwoyke commented 2 years ago

Hi @Javs95, Can you please provide a more detailed description on how to reproduce an issue? In which sub-module does the problem occur? Or at least a screen shoot would be more than welcome :) We can't reproduce this situation.

kwoyke commented 2 years ago

We were unable to reproduce the issue. Probably it got fixed meanwhile.

mpsanchis commented 2 years ago

Hello @kwoyke I have found the issue that IMO @Javs95 was talking about: when running the three modules in oauth-authorization-server (client-server, resource-server, and spring-authorization-server), the final result is a redirection to "/" instead of "/articles".

Moreover, the flow consists of a bunch of redirections to /login, even including accessing the Client's endpoint "/oauth2/authorization/articles-client-oidc?error", which results in a new call to the Auth Server's "/authorization" endpoint again. This is not a "vanilla" flow of the authorization code grant, as there are more calls than necessary.

I am attaching all the calls in the protocol from a capture from Wireshark, hope it helps. image

mpsanchis commented 2 years ago

Hi @lor6 , I am quite new to contributing/commenting to open-source, so I am not sure if my last message reached someone or not. I thought this issue might be worth considering re-opening. I am just tagging you because I saw a lot of activity from your side in this repo, but please let me know if there is a different way to proceed. Thank you