Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Login ignores ?redirect parameter #304

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

Closed
bryphe-coder opened this issue Feb 16, 2022 · 0 comments · Fixed by #307
Closed

Login ignores ?redirect parameter #304

bryphe-coder opened this issue Feb 16, 2022 · 0 comments · Fixed by #307
Labels
api Area: HTTP API site Area: frontend dashboard

Comments

@bryphe-coder
Copy link
Contributor

Our login page takes a ?redirect parameter, which is supposed to specify the landing page after the login flow completes.

However, this not working as expected, and always takes the user to /projects:
2022-02-16 10 24 46

This is a blocker for #298 because that relies on ?redirect=%2Fcli_auth to work correctly.

@bryphe-coder bryphe-coder self-assigned this Feb 16, 2022
bryphe-coder added a commit that referenced this issue Feb 17, 2022
…307)

Fixes #304 
Unblocks #298 

After logging in, the login flow should redirect to a whatever path is specified by the `?redirect` query parameter. This is important for cases like #298 - where we need to set `?redirect=%2Fcli_auth`, but also really any case where the user is linked and might have to go back to the login screen.

The fix is simple - just check if the `redirect` query parameter is set, and if it is, use that as the path to redirect to on success. Also adds a test case - we had one checking that we redirect to the default (root `/`) url, but not one of the `?redirect` param
@misskniss misskniss added api Area: HTTP API site Area: frontend dashboard labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants