made the redirect after logging out blocking as well

This commit is contained in:
Art Lowel
2020-09-03 12:58:40 +02:00
parent 17249e9541
commit e9a2b4b368
2 changed files with 15 additions and 3 deletions

View File

@@ -239,8 +239,8 @@ describe('authReducer', () => {
authToken: undefined, authToken: undefined,
error: undefined, error: undefined,
loaded: false, loaded: false,
blocking: false, blocking: true,
loading: false, loading: true,
info: undefined, info: undefined,
refreshing: false, refreshing: false,
userId: undefined userId: undefined

View File

@@ -141,7 +141,6 @@ export function authReducer(state: any = initialState, action: AuthActions): Aut
error: (action as LogOutErrorAction).payload.message error: (action as LogOutErrorAction).payload.message
}); });
case AuthActionTypes.LOG_OUT_SUCCESS:
case AuthActionTypes.REFRESH_TOKEN_ERROR: case AuthActionTypes.REFRESH_TOKEN_ERROR:
return Object.assign({}, state, { return Object.assign({}, state, {
authenticated: false, authenticated: false,
@@ -155,6 +154,19 @@ export function authReducer(state: any = initialState, action: AuthActions): Aut
userId: undefined userId: undefined
}); });
case AuthActionTypes.LOG_OUT_SUCCESS:
return Object.assign({}, state, {
authenticated: false,
authToken: undefined,
error: undefined,
loaded: false,
blocking: true,
loading: true,
info: undefined,
refreshing: false,
userId: undefined
});
case AuthActionTypes.REDIRECT_AUTHENTICATION_REQUIRED: case AuthActionTypes.REDIRECT_AUTHENTICATION_REQUIRED:
case AuthActionTypes.REDIRECT_TOKEN_EXPIRED: case AuthActionTypes.REDIRECT_TOKEN_EXPIRED:
return Object.assign({}, state, { return Object.assign({}, state, {