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

Local storage should use a random storage key unless unique key is defined #200

Open
TriangleJuice opened this issue Jun 9, 2020 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed missing info This issue requires additional information.

Comments

@TriangleJuice
Copy link
Contributor

Describe the bug

When two apps use the navigation menu and there's no unique storage key specified in both apps, the one app will inherit the state of the other and vice-versa. This can be troublesome if one app uses the docked the mode and the other doesn't

To Reproduce

Steps to reproduce the behavior:

  1. Integrate navigation menu in app A with possibility to switch to docked mode
  2. Integrate navigation menu in app B with NO possibility to switch to docked mode
  3. Go to app A and activate docked mode
  4. Go to app B and reload

Expected behavior

App B shouldn't inherit the local storage preferences of app B.

Screenshots

Screenshot 2020-06-09 at 16 57 07

OS (please complete the following information):

N/A

Additional context

N/A

@TriangleJuice TriangleJuice added bug Something isn't working verified This issue has been verified by a maintainer. labels Jun 9, 2020
@TriangleJuice TriangleJuice changed the title Local storage should use a random storage key unless unique key is defined. Local storage should use a random storage key unless unique key is defined Jun 9, 2020
@jsebrech
Copy link
Contributor

Localstorage is specific to a browser origin, so I don't really see how you can get this in production (on localhost it is indeed quite likely).

@TriangleJuice
Copy link
Contributor Author

Because - if I'm right - on production local storage will not make a difference between the many subdomains.

@jsebrech
Copy link
Contributor

No, subdomains are still separate origins, see https://stackoverflow.com/questions/4026479/use-localstorage-across-subdomains

@TriangleJuice TriangleJuice added help wanted Extra attention is needed missing info This issue requires additional information. and removed verified This issue has been verified by a maintainer. labels Jun 10, 2020
@TriangleJuice
Copy link
Contributor Author

I suggest that we do some research on this and then close the issue if you're right. Thanks for starting the conversation :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed missing info This issue requires additional information.
Projects
None yet
Development

No branches or pull requests

2 participants