2018-07-13 20:50:21 +02:00
|
|
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" class="container" ngNativeValidate>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="row justify-content-md-center mt-5">
|
2018-06-11 18:58:56 +02:00
|
|
|
<div class="col-5" [ngClass]="{'col-9': selectedProviderType === providerType.Duo || selectedProviderType === providerType.OrganizationDuo}">
|
2018-06-11 17:43:10 +02:00
|
|
|
<p class="lead text-center mb-4">{{title}}</p>
|
2018-07-25 18:13:18 +02:00
|
|
|
<div class="card d-block">
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="card-body">
|
|
|
|
<ng-container *ngIf="selectedProviderType === providerType.Email || selectedProviderType === providerType.Authenticator">
|
|
|
|
<p *ngIf="selectedProviderType === providerType.Authenticator">{{'enterVerificationCodeApp' | i18n}}</p>
|
|
|
|
<p *ngIf="selectedProviderType === providerType.Email">
|
|
|
|
{{'enterVerificationCodeEmail' | i18n : twoFactorEmail}}
|
|
|
|
</p>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="code" class="sr-only">{{'verificationCode' | i18n}}</label>
|
2018-07-13 20:50:21 +02:00
|
|
|
<input id="code" type="text" name="Code" class="form-control" [(ngModel)]="token" required appAutofocus inputmode="tel" appInputVerbatim>
|
2018-06-11 17:43:10 +02:00
|
|
|
<small class="form-text" *ngIf="selectedProviderType === providerType.Email">
|
|
|
|
<a href="#" appStopClick (click)="sendEmail(true)" [appApiAction]="emailPromise" *ngIf="selectedProviderType === providerType.Email">
|
|
|
|
{{'sendVerificationCodeEmailAgain' | i18n}}
|
|
|
|
</a>
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</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>
|
2018-07-13 20:50:21 +02:00
|
|
|
<input id="code" type="password" name="Code" class="form-control" [(ngModel)]="token" required appAutofocus appInputVerbatim>
|
2018-06-11 17:43:10 +02:00
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="selectedProviderType === providerType.U2f">
|
|
|
|
<p class="text-center" *ngIf="!u2fReady">
|
2018-07-18 05:15:15 +02:00
|
|
|
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
2018-06-11 17:43:10 +02:00
|
|
|
</p>
|
|
|
|
<ng-container *ngIf="u2fReady">
|
|
|
|
<p class="text-center">{{'insertU2f' | i18n}}</p>
|
|
|
|
<img src="../../images/u2fkey.jpg" alt="" class="rounded img-fluid mb-3">
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="selectedProviderType === providerType.Duo ||
|
|
|
|
selectedProviderType === providerType.OrganizationDuo">
|
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>
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
2018-07-18 05:15:15 +02:00
|
|
|
<i class="fa fa-spinner text-muted fa-spin pull-right" title="{{'loading' | i18n}}" *ngIf="form.loading && selectedProviderType === providerType.U2f"></i>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="form-check" *ngIf="selectedProviderType != null">
|
|
|
|
<input id="remember" type="checkbox" name="Remember" class="form-check-input" [(ngModel)]="remember">
|
|
|
|
<label for="remember" class="form-check-label">{{'rememberMe' | i18n}}</label>
|
2018-06-05 21:02:53 +02: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>
|
|
|
|
<hr>
|
|
|
|
<div class="d-flex mb-3">
|
2018-07-18 05:15:15 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-block btn-submit" [disabled]="form.loading" *ngIf="selectedProviderType != null && selectedProviderType !== providerType.Duo &&
|
2018-06-11 17:43:10 +02:00
|
|
|
selectedProviderType !== providerType.OrganizationDuo && selectedProviderType !== providerType.U2f">
|
2018-07-18 05:15:15 +02:00
|
|
|
<span>
|
|
|
|
<i class="fa fa-sign-in"></i> {{'continue' | i18n}}
|
|
|
|
</span>
|
|
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}"></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}}
|
|
|
|
</a>
|
2018-06-05 21:02:53 +02:00
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
<div class="text-center">
|
|
|
|
<a href="#" appStopClick (click)="anotherMethod()">{{'useAnotherTwoStepMethod' | i18n}}</a>
|
2018-06-05 21:02:53 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-06-11 17:43:10 +02:00
|
|
|
</div>
|
2018-06-05 21:02:53 +02:00
|
|
|
</form>
|
2018-06-11 17:43:10 +02:00
|
|
|
<ng-template #twoFactorOptions></ng-template>
|
2018-06-11 17:58:11 +02:00
|
|
|
<iframe id="u2f_iframe" hidden></iframe>
|