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

being logged out after refreshing #631

Open
kkshyu opened this issue Mar 7, 2019 · 0 comments
Open

being logged out after refreshing #631

kkshyu opened this issue Mar 7, 2019 · 0 comments

Comments

@kkshyu
Copy link

kkshyu commented Mar 7, 2019

the cookie access_token will be cleared after refreshing the page. after shooting the problem, the main cause is that reduxStore will check the tokenInStore and decide sign in or sign out.

for the following lines, i think it should check and dispatch tokenInStore instead of token.

if (typeof token === 'string' && !token.includes('Error')) {
if (token.length) {
store.dispatch(dispatchers.signIn(token));
} else {
store.dispatch(dispatchers.signOut());
}
} else {
store.dispatch(dispatchers.signOut());
}

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

No branches or pull requests

1 participant