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 SessionStorage based store #356

Closed
wants to merge 1 commit into from
Closed

Add SessionStorage based store #356

wants to merge 1 commit into from

Conversation

DVG
Copy link
Contributor

@DVG DVG commented Nov 19, 2014

This implements a new store, the sessionStorage store, which may be better in some use cases than persisting auth tokens indefinitely in localStorage.

@marcoow
Copy link
Member

marcoow commented Nov 19, 2014

Can you extract this into its own package similar to simple-auth-cookie-store?

@method bindToStorageEvents
@private
*/
bindToStorageEvents: function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary as sessionStorage is isolated between tabs/windows anyway.

@DVG
Copy link
Contributor Author

DVG commented Nov 19, 2014

Sure I'll try and do that this week sometime.

@DVG
Copy link
Contributor Author

DVG commented Nov 20, 2014

Will reopen once I have myself acquainted with npm packaging.

@DVG DVG closed this Nov 20, 2014
@marcoow
Copy link
Member

marcoow commented Nov 21, 2014

OK, cool. One thing though: as sessionStorage is isolated per tab/window there can be no synchronization of authentication state between tabs/windows. The better approach is usually to use the cooke based store with session cookies as that offers synchronization plus deletes the cookies when the browser is closed.

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.

2 participants