mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Splitted redirect to login page method
This commit is contained in:
@@ -133,10 +133,16 @@ export class AuthEffects {
|
||||
|
||||
@Effect({dispatch: false})
|
||||
public redirectToLogin: Observable<Action> = this.actions$
|
||||
.ofType(AuthActionTypes.REDIRECT_TOKEN_EXPIRED, AuthActionTypes.REDIRECT_AUTHENTICATION_REQUIRED)
|
||||
.ofType(AuthActionTypes.REDIRECT_AUTHENTICATION_REQUIRED)
|
||||
.do(() => this.authService.removeToken())
|
||||
.do(() => this.authService.redirectToLogin());
|
||||
|
||||
@Effect({dispatch: false})
|
||||
public redirectToLogin: Observable<Action> = this.actions$
|
||||
.ofType(AuthActionTypes.REDIRECT_TOKEN_EXPIRED)
|
||||
.do(() => this.authService.removeToken())
|
||||
.do(() => this.authService.redirectToLoginWhenTokenExpired());
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Actions} actions$
|
||||
|
Reference in New Issue
Block a user