Open sylvainlap opened 8 years ago
@sylvainlap In the actions file there is this function logoutUser which first dispatches requestLogout ( where isFetching=true) and then afterwards receiveLogout ( where isFetching=false).
// Logs the user out
export function logoutUser() {
return dispatch => {
dispatch(requestLogout())
localStorage.removeItem('id_token')
dispatch(receiveLogout())
}
}
However, LOGOUT_REQUEST is missing from the auth reducer. I just added it myself to my project, I'm rewriting this in typescript.
also, just to add on to this, in LOGOUT_REQUEST user creds are added but never cleared.
There are some issues with your Logout reducers:
In case of success, isFetching shall be set to false.
Moreover, LOGOUT_REQUEST is missing.