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
OAuth login is ignoring redirect URL #17493
Comments
Linear: ENG-685 |
Would probably need an additional cookie to track this, as the redirect url in the oauth flow is typically a particular value that has been added to the oauth provider as an "approved redirect" value. |
The |
Hi @danielbuechele , I have read the entire issue and recently fixed this bug, can I have a PR for this issue? |
This was fixed in #17939 |
Describe the Bug
When navigating to a particular URL of the app, while being logged out, the app should redirect to this URL after a successful login. This is usually done via the
redirect
query string. However, when using an OAuth provider, this is not happening and instead the user is redirected to the last page stored for their account.The problem are these lines, where the searchParams are cleared: https://github.com/directus/directus/blob/main/app/src/routes/login/components/sso-links.vue#L55-L58
While I understand, the
?continue
param needs to be added to the URL, is there a reason theredirect
param is removed?To Reproduce
http://localhost:8055/admin/settings/data-model
, while not being logged inhttp://localhost:8055/admin/login?redirect=/settings/data-model
http://localhost:8055/auth/login/<provider_name>?redirect=http://localhost:8055/admin/login?continue
Errors Shown
No response
What version of Directus are you using?
9.22.3
What version of Node.js are you using?
18.7.0
What database are you using?
Postgres 13.9
What browser are you using?
Chrome 109.0.5414.119
How are you deploying Directus?
locally
The text was updated successfully, but these errors were encountered: