Added auth token to auth state

This commit is contained in:
Giuseppe Digilio
2018-04-10 15:20:28 +02:00
parent 1f953b6b9d
commit 04be7170c3
5 changed files with 44 additions and 16 deletions

View File

@@ -57,7 +57,7 @@ export class AuthEffects {
.ofType(AuthActionTypes.AUTHENTICATED)
.switchMap((action: AuthenticatedAction) => {
return this.authService.authenticatedUser(action.payload)
.map((user: Eperson) => new AuthenticatedSuccessAction((user !== null), user))
.map((user: Eperson) => new AuthenticatedSuccessAction((user !== null), action.payload, user))
.catch((error) => Observable.of(new AuthenticatedErrorAction(error)));
});