Mastodon: clear token on 401 in VERIFY_CREDENTIALS_FAIL
This commit is contained in:
parent
c5a5c5a6e3
commit
86950dde42
1 changed files with 1 additions and 1 deletions
|
@ -267,7 +267,7 @@ const reducer = (state, action) => {
|
||||||
case VERIFY_CREDENTIALS_SUCCESS:
|
case VERIFY_CREDENTIALS_SUCCESS:
|
||||||
return importCredentials(state, action.token, action.account);
|
return importCredentials(state, action.token, action.account);
|
||||||
case VERIFY_CREDENTIALS_FAIL:
|
case VERIFY_CREDENTIALS_FAIL:
|
||||||
return action.error.response.status === 403 ? deleteToken(state, action.token) : state;
|
return [401, 403].includes(action.error.response.status) ? deleteToken(state, action.token) : state;
|
||||||
case SWITCH_ACCOUNT:
|
case SWITCH_ACCOUNT:
|
||||||
return state.set('me', action.account.get('url'));
|
return state.set('me', action.account.get('url'));
|
||||||
case ME_FETCH_SKIP:
|
case ME_FETCH_SKIP:
|
||||||
|
|
Loading…
Reference in a new issue