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

Support custom storage handlers (in.e. localstorage versus sessionstorage) #6

Open
ghost opened this issue Apr 24, 2012 · 2 comments
Open
Assignees

Comments

@ghost
Copy link

ghost commented Apr 24, 2012

What do you think about using sessionStorage instead of localStorage for storing the access tokens? That way they would be wiped in between browser restarts (like for SAML IdPs). As the user has approved the client access anyway all it would require is a redirect to get a new access token...

What are your thoughts?

@andreassolberg
Copy link
Owner

This is a good question.

For my use cases it is important to be able to permanently store tokens.

I believe what can be done is to add support for storage handlers.

Also it would be a good idea to add support for a logout handler, allowing developers to initiate wiping the tokens, regardless of whether session storage or localstorage is used.

@ghost ghost assigned andreassolberg Apr 26, 2012
@chromyd
Copy link

chromyd commented Dec 19, 2019

Hi, any updates on this - 9 years later? 😉 I am trying to get this library to work in a native mobile app built with React Native - and I fail because obviously there is no localStorage outside of the browser.

Is that generally a good idea, to use this library in a mobile app (not a PWA)?

I think the localStorage problem can be easily remedied by adding support for storage handlers (something akin to custom loaders support) and I would be happy to create a MR for this.

Your thoughts?

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