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

Multiple apps deployed on the same host share the same authentication with each other #504

Open
2 tasks
limouren opened this issue May 15, 2019 · 1 comment

Comments

@limouren
Copy link
Contributor

limouren commented May 15, 2019

Consider two apps App A and App B being deployed on http://example.com/a and http://example.com/b respectively (Note that they are on the same host).

  1. Visit App A
  2. Open inspector on App A and observe the local storage
  3. Log into App A, you should observe two keys skygear-accesstoken and skygear-user being created
  4. Now visit App B in another tab
  5. Do a logout on App B
  6. Now inspect the local storage of App A, you should notice that the two keys are deleted

It is currently affecting sites on Skygear Portal which has served its app using [app-name].skygeario.com (e.g. http://myapp.skygeario.com/static/spa and has enabled CMS. (client app vs CMS app)

  • Skygear SDK Date/Version: 1.6.4
  • JS runtime:
  • Skygear Server Date/Version: N/A
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

  1. Logout from App B shouldn't affect App A
  2. App A and App B shouldn't be able to access each other stored values (not sure whether it is possible...)

Actual Results

Steps to reproduce

@limouren limouren changed the title Multiple apps deployed on the same host share the same authentication with each others Multiple apps deployed on the same host share the same authentication with each other May 15, 2019
@louischan-oursky
Copy link
Contributor

If we only support localStorage, we can just add configurable key prefix so that keys written by a skygear instance is namespaced. For cookie, we need to ensure Set-Cookie header has correct path set.

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

No branches or pull requests

2 participants