if check of Authentication Cookie succeed store token

This commit is contained in:
Giuseppe Digilio
2020-01-08 18:25:15 +01:00
parent fdd05d2fec
commit 6801194cbb

View File

@@ -99,6 +99,7 @@ export class AuthEffects {
return this.authService.checkAuthenticationCookie().pipe(
map((response: AuthStatus) => {
if (response.authenticated) {
this.authService.storeToken(response.token);
return new AuthenticatedAction(response.token);
} else {
return new RetrieveAuthMethodsAction(response);