Skip to content

being logged out after refreshing #631

@kkshyu

Description

@kkshyu

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());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions