42 lines
2.0 KiB
HTML
42 lines
2.0 KiB
HTML
<form action="{{apiUrl}}/auth/login/2fa" method="POST" #form2FA>
|
|
<mat-card>
|
|
<mat-card-content>
|
|
<h2>{{'security.2fa.external' | i18n}}<mat-icon style="font-size: 1em;">open_in_new
|
|
</mat-icon>
|
|
</h2>
|
|
<mat-error *ngIf="loginInvalid">
|
|
{{'security.2fa.invalid' | i18n}}
|
|
</mat-error>
|
|
<input id="provider" name="provider" matInput hidden [value]="selectedProvider.id">
|
|
<mat-form-field>
|
|
<mat-label>{{'security.2fa.provider' | i18n}}</mat-label>
|
|
<mat-select [(ngModel)]="selectedProvider" [ngModelOptions]="{standalone: true}">
|
|
<mat-option *ngFor="let provider of providers" [value]="provider">
|
|
{{'security.2fa.' + provider.id | i18n}}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<a mat-raised-button (click)="request()"
|
|
*ngIf="selectedProvider && selectedProvider.request">{{'security.2fa.' + selectedProvider.id +
|
|
'.request'
|
|
| i18n}}</a>
|
|
<mat-form-field>
|
|
<mat-label>{{'security.2fa.code' | i18n}}</mat-label>
|
|
<input id="code" name="code" matInput required matAutofocus>
|
|
<mat-error>
|
|
{{'security.2fa.missing' | i18n}}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
<mat-slide-toggle #toggle [checked]="keep">
|
|
{{'security.2fa.keepSession' | i18n}}
|
|
</mat-slide-toggle>
|
|
<input class="hidden" type="checkbox" id="keep" name="keep" [checked]="toggle.checked">
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<a type="submit" mat-raised-button color="primary" (click)="form2FA.submit()"
|
|
[disabled]="form2FA.invalid">{{'security.2fa.login' | i18n}}<mat-icon style="font-size: 1em;">
|
|
open_in_new
|
|
</mat-icon></a>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</form> |