Sly777 / ran

:zap: RAN! React . GraphQL . Next.js Toolkit :zap: - SEO-Ready, Production-Ready, SSR, Hot-Reload, CSS-in-JS, Caching, CLI commands and more...
MIT License
2.22k stars 160 forks source link

being logged out after refreshing #631

Open kkshyu opened 5 years ago

kkshyu commented 5 years ago

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. https://github.com/Sly777/ran/blob/bc73ff6219c37c909102a5f980807d50d4a087cd/libraries/reduxStore.js#L24-L32