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()); |
|
} |
the cookie
access_tokenwill be cleared after refreshing the page. after shooting the problem, the main cause is that reduxStore will check thetokenInStoreand decide sign in or sign out.for the following lines, i think it should check and dispatch
tokenInStoreinstead oftoken.ran/libraries/reduxStore.js
Lines 24 to 32 in bc73ff6