mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 19:13:08 +00:00
Added effect: checkTokenError
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
|||||||
RefreshTokenSuccessAction,
|
RefreshTokenSuccessAction,
|
||||||
RegistrationAction,
|
RegistrationAction,
|
||||||
RegistrationErrorAction,
|
RegistrationErrorAction,
|
||||||
RegistrationSuccessAction, RetrieveAuthMethodsErrorAction, RetrieveAuthMethodsSuccessAction
|
RegistrationSuccessAction, RetrieveAuthMethodsAction, RetrieveAuthMethodsErrorAction, RetrieveAuthMethodsSuccessAction
|
||||||
} from './auth.actions';
|
} from './auth.actions';
|
||||||
import { EPerson } from '../eperson/models/eperson.model';
|
import { EPerson } from '../eperson/models/eperson.model';
|
||||||
import { AuthStatus } from './models/auth-status.model';
|
import { AuthStatus } from './models/auth-status.model';
|
||||||
@@ -88,6 +88,13 @@ export class AuthEffects {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@Effect()
|
||||||
|
public checkTokenError$: Observable<Action> = this.actions$
|
||||||
|
.pipe(
|
||||||
|
ofType(AuthActionTypes.CHECK_AUTHENTICATION_TOKEN_ERROR),
|
||||||
|
map(() => new RetrieveAuthMethodsAction())
|
||||||
|
)
|
||||||
|
|
||||||
@Effect()
|
@Effect()
|
||||||
public createUser$: Observable<Action> = this.actions$.pipe(
|
public createUser$: Observable<Action> = this.actions$.pipe(
|
||||||
ofType(AuthActionTypes.REGISTRATION),
|
ofType(AuthActionTypes.REGISTRATION),
|
||||||
|
@@ -19,11 +19,14 @@
|
|||||||
type="password">
|
type="password">
|
||||||
<div *ngIf="(error | async) && hasError" class="alert alert-danger" role="alert" @fadeOut>{{ (error | async) | translate }}</div>
|
<div *ngIf="(error | async) && hasError" class="alert alert-danger" role="alert" @fadeOut>{{ (error | async) | translate }}</div>
|
||||||
<div *ngIf="(message | async) && hasMessage" class="alert alert-info" role="alert" @fadeOut>{{ (message | async) | translate }}</div>
|
<div *ngIf="(message | async) && hasMessage" class="alert alert-info" role="alert" @fadeOut>{{ (message | async) | translate }}</div>
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" [disabled]="!form.valid">{{"login.form.submit" | translate}}</button>
|
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" [disabled]="!form.valid">{{"login.form.submit" | translate}}</button>
|
||||||
|
|
||||||
<div *ngIf="(hasSsoLoginUrl | async)">
|
<div *ngIf="(hasSsoLoginUrl | async)">
|
||||||
<div class="text-center mt-2"><span class="align-middle">{{"login.form.or-divider" | translate}}</span></div>
|
<div class="text-center mt-2"><span class="align-middle">{{"login.form.or-divider" | translate}}</span></div>
|
||||||
<a class="btn btn-lg btn-primary btn-block mt-2" [href]="(ssoLoginUrl | async)" role="button">{{"login.form.ssoLogin" | translate}}</a>
|
<a class="btn btn-lg btn-primary btn-block mt-2" [href]="(ssoLoginUrl | async)" role="button">{{"login.form.ssoLogin" | translate}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#">{{"login.form.new-user" | translate}}</a>
|
<a class="dropdown-item" href="#">{{"login.form.new-user" | translate}}</a>
|
||||||
<a class="dropdown-item" href="#">{{"login.form.forgot-password" | translate}}</a>
|
<a class="dropdown-item" href="#">{{"login.form.forgot-password" | translate}}</a>
|
||||||
|
Reference in New Issue
Block a user