-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
redirect behavior change between v1.8.5 and v1.9.x #2363
Comments
Thank you for the report - how are you communicating with hydra's login and consent endpoints? Through the Angular AJAX? |
Angular UI will do some processing, and pass the login_challenge to backend service. The backend service will call hydra login and consent endpoints. |
Ok good :) Just wanted to make sure! The problem is probably how we construct the query. In the past, we just appended the query. Now we parse the URL and use Generally, we don't want to be too favorable to SPAs due to the risk of people using AJAX to communicate with Ory Hydra admin. However, I do understand that this sucks for specific use cases where this is wanted. I would be fine with fixing this behavior to resolve your issue. Would you be up for a PR? |
allow #fragment in configured url to keep backwards compatibility. Close ory#2363
Allow #fragment in configured url to keep backwards compatibility. Close #2363 Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
Allow #fragment in configured url to keep backwards compatibility. Close ory#2363 Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
Describe the bug
The /oauth2/auth changed redirect behavior between v1.8.5 and v1.9.x. If the URLS_LOGIN is an angular UI app that contains /#/ e.g. http://localhost:3000/#/oauth/login
In v1.8.5, /oauth/auth endpoint redirects to "http://localhost:3000/?login_challenge=48ef86fa7f8142099aacbd172628f708#/oauth/login"
However, in v1.9.2 /oauth/auth endpoint redirects to "http://localhost:3000/%23/oauth/login?login_challenge=48ef86fa7f8142099aacbd172628f708"
Reproducing the bug
Steps to reproduce the behavior:
The response header "Location" value is
http://localhost:3000/%23/oauth/login?login_challenge=48ef86fa7f8142099aacbd172628f708
Server logs
No error
Server configuration
None
Expected behavior
Expect the redirect behavior remains compatible to v1.8.5
http://localhost:3000/?login_challenge=48ef86fa7f8142099aacbd172628f708#/oauth/login
. So the angular login UI can remain functional after upgrade post v1.8.5.Environment
Git Hash: f0580e2
Build Time: 2021-01-29T15:02:55Z
The text was updated successfully, but these errors were encountered: