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

Session - use localStorage instead of sessionStorage #1623

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Session - use localStorage instead of sessionStorage #1623

merged 1 commit into from
Jan 30, 2020

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jan 29, 2020

sessionStorage is not shared between tabs (unless one gets opened from the other),
and disappears when closing the tab.

Thus, opening a link in a new tab just doesn't work and redirects to /login.
Changing to use localStorage instead - the same change was needed in ui-classic: ManageIQ/manageiq-ui-classic#3065

The one place that's still using sessionStorage after this is the ApplianceInfo service, for caching. That looks more like ephemeral cache which doesn't have to be shared.

Fixes #1527

sessionStorage is not shared between tabs (unless one gets opened from the other),
and disappears when closing the tab

the same change was needed in ui-classic: ManageIQ/manageiq-ui-classic#3065

The one place that's still using sessionStorage after this is the ApplianceInfo service, for caching. That looks more like ephemeral cache which doesn't have to be shared.
@miq-bot miq-bot changed the title Session - use localStorage instead of sessionStorage [WIP] Session - use localStorage instead of sessionStorage Jan 29, 2020
@miq-bot miq-bot added the wip label Jan 29, 2020
@himdel
Copy link
Contributor Author

himdel commented Jan 29, 2020

@miq-bot remove_label wip

It works, opening /services/80 in a new tab no longer redirects to /login.
Opening / goes to Dashboard.

@miq-bot miq-bot changed the title [WIP] Session - use localStorage instead of sessionStorage Session - use localStorage instead of sessionStorage Jan 29, 2020
@miq-bot miq-bot removed the wip label Jan 29, 2020
@miq-bot
Copy link
Member

miq-bot commented Jan 29, 2020

Checked commit https://github.com/himdel/manageiq-ui-service/commit/554ef42d698c1ad3f5f296de83c4bce96fbaa532 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@mzazrivec mzazrivec self-assigned this Jan 30, 2020
@mzazrivec mzazrivec added the bug label Jan 30, 2020
@mzazrivec mzazrivec added this to the Sprint 129 Ending Feb 3, 2020 milestone Jan 30, 2020
@mzazrivec mzazrivec merged commit 904064b into ManageIQ:master Jan 30, 2020
@himdel himdel deleted the storage-login branch January 30, 2020 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct link to service redirects to login page even if user authorized
3 participants