mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
store token on AUTHENTICATED_SUCCESS action
This commit is contained in:
@@ -65,7 +65,6 @@ export class AuthEffects {
|
||||
@Effect()
|
||||
public authenticateSuccess$: Observable<Action> = this.actions$.pipe(
|
||||
ofType(AuthActionTypes.AUTHENTICATE_SUCCESS),
|
||||
tap((action: AuthenticationSuccessAction) => this.authService.storeToken(action.payload)),
|
||||
map((action: AuthenticationSuccessAction) => new AuthenticatedAction(action.payload))
|
||||
);
|
||||
|
||||
@@ -82,6 +81,7 @@ export class AuthEffects {
|
||||
@Effect()
|
||||
public authenticatedSuccess$: Observable<Action> = this.actions$.pipe(
|
||||
ofType(AuthActionTypes.AUTHENTICATED_SUCCESS),
|
||||
tap((action: AuthenticatedSuccessAction) => this.authService.storeToken(action.payload.authToken)),
|
||||
map((action: AuthenticatedSuccessAction) => new RetrieveAuthenticatedEpersonAction(action.payload.userHref))
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user