2018-07-30 14:00:23 +02:00
|
|
|
<form
|
|
|
|
#form
|
|
|
|
(ngSubmit)="submit()"
|
|
|
|
[appApiAction]="formPromise"
|
|
|
|
class="container"
|
|
|
|
ngNativeValidate
|
|
|
|
autocomplete="off"
|
|
|
|
>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="row justify-content-md-center mt-5">
|
|
|
|
<div
|
|
|
|
class="col-5"
|
2019-02-21 22:50:37 +01:00
|
|
|
[ngClass]="{
|
2021-12-17 15:57:11 +01:00
|
|
|
'col-9':
|
2019-02-21 22:50:37 +01:00
|
|
|
selectedProviderType === providerType.Duo ||
|
|
|
|
selectedProviderType === providerType.OrganizationDuo
|
2018-06-11 17:43:10 +02:00
|
|
|
}"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-11 17:43:10 +02:00
|
|
|
<p class="lead text-center mb-4">{{ title }}</p>
|
2019-02-21 22:50:37 +01:00
|
|
|
<div class="card d-block">
|
|
|
|
<div class="card-body">
|
|
|
|
<ng-container
|
|
|
|
*ngIf="
|
|
|
|
selectedProviderType === providerType.Email ||
|
2018-06-11 17:43:10 +02:00
|
|
|
selectedProviderType === providerType.Authenticator
|
2019-02-21 22:50:37 +01:00
|
|
|
"
|
2018-06-11 17:43:10 +02:00
|
|
|
>
|
2021-03-16 17:44:31 +01:00
|
|
|
<p *ngIf="selectedProviderType === providerType.Authenticator">
|
2018-06-11 17:43:10 +02:00
|
|
|
{{ "enterVerificationCodeApp" | i18n }}
|
2021-12-17 15:57:11 +01:00
|
|
|
</p>
|
2018-06-11 17:43:10 +02:00
|
|
|
<p *ngIf="selectedProviderType === providerType.Email">
|
2019-02-21 22:50:37 +01:00
|
|
|
{{ "enterVerificationCodeEmail" | i18n: twoFactorEmail }}
|
2021-03-16 17:44:31 +01:00
|
|
|
</p>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="code" class="sr-only">{{ "verificationCode" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
id="code"
|
|
|
|
type="text"
|
2019-02-21 22:50:37 +01:00
|
|
|
name="Code"
|
|
|
|
class="form-control"
|
|
|
|
[(ngModel)]="token"
|
|
|
|
required
|
|
|
|
appAutofocus
|
|
|
|
inputmode="tel"
|
|
|
|
appInputVerbatim
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2019-02-21 22:50:37 +01:00
|
|
|
<small class="form-text" *ngIf="selectedProviderType === providerType.Email">
|
2021-12-17 15:57:11 +01:00
|
|
|
<a
|
|
|
|
href="#"
|
2018-06-11 17:43:10 +02:00
|
|
|
appStopClick
|
2021-03-16 17:44:31 +01:00
|
|
|
(click)="sendEmail(true)"
|
|
|
|
[appApiAction]="emailPromise"
|
|
|
|
*ngIf="selectedProviderType === providerType.Email"
|
2019-10-11 17:22:21 +02:00
|
|
|
>
|
|
|
|
{{ "sendVerificationCodeEmailAgain" | i18n }}
|
2018-06-11 17:43:10 +02:00
|
|
|
</a>
|
2018-06-05 21:02:53 +02:00
|
|
|
</small>
|
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="selectedProviderType === providerType.Yubikey">
|
|
|
|
<p class="text-center">{{ "insertYubiKey" | i18n }}</p>
|
|
|
|
<img src="../../images/yubikey.jpg" class="rounded img-fluid mb-3" alt="" />
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="code" class="sr-only">{{ "verificationCode" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="code"
|
|
|
|
type="password"
|
|
|
|
name="Code"
|
|
|
|
class="form-control"
|
|
|
|
[(ngModel)]="token"
|
2021-12-17 15:57:11 +01:00
|
|
|
required
|
2019-02-21 22:50:37 +01:00
|
|
|
appAutofocus
|
|
|
|
appInputVerbatim
|
|
|
|
autocomplete="new-password"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</ng-container>
|
2021-03-16 17:44:31 +01:00
|
|
|
<ng-container *ngIf="selectedProviderType === providerType.WebAuthn">
|
|
|
|
<div id="web-authn-frame" class="mb-3">
|
2021-08-13 16:23:51 +02:00
|
|
|
<iframe id="webauthn_iframe" [allow]="webAuthnAllow"></iframe>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</ng-container>
|
2019-02-21 22:50:37 +01:00
|
|
|
<ng-container
|
2021-12-17 15:57:11 +01:00
|
|
|
*ngIf="
|
2019-02-21 22:50:37 +01:00
|
|
|
selectedProviderType === providerType.Duo ||
|
|
|
|
selectedProviderType === providerType.OrganizationDuo
|
2021-12-17 15:57:11 +01:00
|
|
|
"
|
|
|
|
>
|
2018-06-11 18:58:56 +02:00
|
|
|
<div id="duo-frame" class="mb-3">
|
2018-06-11 17:43:10 +02:00
|
|
|
<iframe id="duo_iframe"></iframe>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</ng-container>
|
2021-12-17 15:57:11 +01:00
|
|
|
<i
|
2019-02-21 22:50:37 +01:00
|
|
|
class="fa fa-spinner text-muted fa-spin pull-right"
|
2019-10-11 16:35:24 +02:00
|
|
|
title="{{ 'loading' | i18n }}"
|
2021-03-16 17:44:31 +01:00
|
|
|
*ngIf="form.loading && selectedProviderType === providerType.WebAuthn"
|
2019-10-11 16:35:24 +02:00
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="form-check" *ngIf="selectedProviderType != null">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="remember"
|
|
|
|
type="checkbox"
|
|
|
|
name="Remember"
|
|
|
|
class="form-check-input"
|
|
|
|
[(ngModel)]="remember"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2019-02-21 22:50:37 +01:00
|
|
|
<label for="remember" class="form-check-label">{{ "rememberMe" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
<ng-container *ngIf="selectedProviderType == null">
|
|
|
|
<p>{{ "noTwoStepProviders" | i18n }}</p>
|
|
|
|
<p>{{ "noTwoStepProviders2" | i18n }}</p>
|
|
|
|
</ng-container>
|
2021-12-17 15:57:11 +01:00
|
|
|
<hr />
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="d-flex mb-3">
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2019-02-21 22:50:37 +01:00
|
|
|
type="submit"
|
|
|
|
class="btn btn-primary btn-block btn-submit"
|
2021-03-16 17:44:31 +01:00
|
|
|
[disabled]="form.loading"
|
2021-12-17 15:57:11 +01:00
|
|
|
*ngIf="
|
2019-02-21 22:50:37 +01:00
|
|
|
selectedProviderType != null &&
|
|
|
|
selectedProviderType !== providerType.Duo &&
|
|
|
|
selectedProviderType !== providerType.OrganizationDuo &&
|
2021-03-16 17:44:31 +01:00
|
|
|
selectedProviderType !== providerType.WebAuthn
|
2021-12-17 15:57:11 +01:00
|
|
|
"
|
|
|
|
>
|
|
|
|
<span>
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-sign-in" aria-hidden="true"></i> {{ "continue" | i18n }}
|
2021-12-17 15:57:11 +01:00
|
|
|
</span>
|
|
|
|
<i
|
2019-10-11 16:35:24 +02:00
|
|
|
class="fa fa-spinner fa-spin"
|
|
|
|
title="{{ 'loading' | i18n }}"
|
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
2018-06-11 17:43:10 +02:00
|
|
|
</button>
|
|
|
|
<a routerLink="/" class="btn btn-outline-secondary btn-block ml-2 mt-0">
|
|
|
|
{{ "cancel" | i18n }}
|
2021-12-17 15:57:11 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="text-center">
|
|
|
|
<a href="#" appStopClick (click)="anotherMethod()">{{
|
|
|
|
"useAnotherTwoStepMethod" | i18n
|
2021-12-17 15:57:11 +01:00
|
|
|
}}</a>
|
|
|
|
</div>
|
2018-06-05 21:02:53 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-05 21:02:53 +02:00
|
|
|
</form>
|
2018-06-11 17:43:10 +02:00
|
|
|
<ng-template #twoFactorOptions></ng-template>
|