Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

If user refresh the page, what happens? #2

Open
jeangomes opened this issue Jun 12, 2019 · 3 comments
Open

If user refresh the page, what happens? #2

jeangomes opened this issue Jun 12, 2019 · 3 comments

Comments

@jeangomes
Copy link

Hi, sorry for my english.
I could not see in your code if you treat this situation.
I'm tested, and I lost my logged state.

@stefanvanherwijnen
Copy link
Owner

Hi, I think for a SPA and PWA it will go back to the home page. This is the default behavior and I didn't handle it in any other way. In the future the Auth functionality will be ported to an app extension.

@jeangomes
Copy link
Author

But, in relation a authentication. How keep user logged?
Do you save the token in local storage...
How do you suggest dealing with this?
Like a tradicional application.

@stefanvanherwijnen
Copy link
Owner

If you tick 'remember me',, the token is indeed stored in local storage. When refreshing the store is checked for an authentication user, and if there isn't one the existence of the token in local storage is checked.

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

No branches or pull requests

2 participants