-
Notifications
You must be signed in to change notification settings - Fork 23
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
#638: Redirect to requested resource on login #665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can not test it locally. Reading the code, I'm afraid this solution may create a little bug, if the user after redirection does not do the login
E.g.
- I'm redirectred to login, so the variable is set in storage
- Instead of doing the login (e.g. I do not have the credentials), I try (now or the day after) to access to mapstore visiting the home page and it will redirect me to the previous page, cancelling storage, that redirects me on login, re-setting the storage variable
- and so on and so on ...
This may be make me do a wrong redirection (once or forever). Could you please test this use case?
If so, I can not actually figure out a solution, we have to think about it. We can limit somehow it with sessionStorage
but the user will have anyway to close the browser/tab to reset it.
- Is more secure to put this in
sessionStorage
instead oflocalStorage
, so this behavior is limited to the current tab. I think it is in anycase the better place to put this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice solution. Thank you.
@ElenaGallo, could you please test this as well as it is deployed on our test instance ? |
@dsuren1 test in DEV passed please backport to 2023.02.xx branch |
@catmorales @jusabatier this update has been also backported to 2023.02.xx. The docker image is also available for your test. |
Description
This PR handle redirection after login when login redirection was performed programatically (due to unauthorized access to a resource and not logged in). Previously requested resource is saved to localstorage and upon successful redirection (after login) the saved localstorage value is cleared
Issue