Skip to content
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

fix(signin): try to preserve current page across reauthentication #7013

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

mas90
Copy link
Contributor

@mas90 mas90 commented Aug 31, 2023

If an authentication session expires or is lost for whatever reason, XO redirects to /signin. This redirect generally preserves the URL fragment (hash) which contains the page selected prior to reauthentication, i.e. if the user had been in settings/servers just beforehand, they end up at /signin#settings/servers. However, currently when they log back in they end up on the home page; the page they were on is forgotten.

This commit tries to send the user back to the page they were viewing before reauthentication, by preserving the URL fragment in the login form action / by appending it to the links to authentication plugins. (Not all authentication plugins will necessarily preserve it internally, but we can optimistically try it and see; at worst the old behaviour will remain.)

@julien-f julien-f self-requested a review September 1, 2023 09:41
@julien-f
Copy link
Member

julien-f commented Oct 3, 2023

Thank you so much for your contribution!

I've changed a bit the implementation to introduce less changes and not rely on identifiers but I've kept your idea 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants