Skip to content
Snippets Groups Projects
Commit 099ebd48 authored by Giuseppe Digilio's avatar Giuseppe Digilio
Browse files

fixes

parent 66295d10
No related branches found
No related tags found
No related merge requests found
......@@ -135,6 +135,7 @@ export class AuthEffects {
public logOutSuccess$: Observable<Action> = this.actions$
.ofType(AuthActionTypes.LOG_OUT_SUCCESS)
.do(() => this.authService.removeToken())
.do(() => this.authService.clearRedirectUrl())
.do(() => this.authService.refreshAfterLogout());
@Effect({dispatch: false})
......
......@@ -74,6 +74,11 @@ export function authReducer(state: any = initialState, action: AuthActions): Aut
info: undefined
});
case AuthActionTypes.AUTHENTICATED:
return Object.assign({}, state, {
loading: true
});
case AuthActionTypes.AUTHENTICATED_ERROR:
return Object.assign({}, state, {
authenticated: false,
......
......@@ -195,7 +195,7 @@ export const getLogOutError = createSelector(getAuthState, _getLogOutError);
export const getRegistrationError = createSelector(getAuthState, _getRegistrationError);
/**
* Returns the redirect url..
* Returns the redirect url.
* @function getRedirectUrl
* @param {AuthState} state
* @param {any} props
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment