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

Add 'path' to setCookie #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

geoidesic
Copy link

When a user of an SPA hits page refresh or uses a bookmark as an entry
point into the app, it is necessary to call the EWD.setCookie function
in order to re-register the session and to map the session cookie to
the new web socket.

If the href has a different path to that when the token was first
generated, you can end up in a situation where QEWD loses track of the
session because it is seen as a new token.

This modification allows one to prevent this undesirable behaviour by
providing the ability to specify the cookie’s path and providing a
sensible default for an SPA

geoidesic and others added 5 commits March 14, 2018 00:33
This event is raised by socket.io in the event of the websocket-server not being available and throwing an ERR_CONNECTION_REFUSED error. This is distinct and different from the `disconnect` event which ewd-client already caters for.
When a user of an SPA hits page refresh or uses a bookmark as an entry
point into the app, it is necessary to call the EWD.setCookie function
in order to re-register the session and to map the session cookie to
the new web socket.

If the href has a different path to that when the token was first
generated, you can end up in a situation where QEWD loses track of the
session because it is seen as a new token.

This modification allows one to prevent this undesirable behaviour by
providing the ability to specify the cookie’s path and providing a
sensible default for an SPA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant