mirror of
https://github.com/go-gitea/gitea
synced 2024-12-21 18:24:09 +01:00
021df29623
This change enables the usage of U2F without being forced to enroll an TOTP authenticator. The `/user/auth/u2f` has been changed to hide the "use TOTP instead" bar if TOTP is not enrolled. Fixes #5410 Fixes #17495
24 lines
815 B
Handlebars
24 lines
815 B
Handlebars
{{template "base/head" .}}
|
|
<div class="page-content user signin">
|
|
<div class="ui middle centered very relaxed page grid">
|
|
<div class="column">
|
|
<h3 class="ui top attached header">
|
|
{{.i18n.Tr "twofa"}}
|
|
</h3>
|
|
<div class="ui attached segment">
|
|
<i class="huge key icon"></i>
|
|
<h3>{{.i18n.Tr "u2f_insert_key"}}</h3>
|
|
{{template "base/alert" .}}
|
|
<p>{{.i18n.Tr "u2f_sign_in"}}</p>
|
|
</div>
|
|
<div id="wait-for-key" class="ui attached segment"><div class="ui active indeterminate inline loader"></div> {{.i18n.Tr "u2f_press_button"}} </div>
|
|
{{if .TOTPEnrolled}}
|
|
<div class="ui attached segment">
|
|
<a href="{{AppSubUrl}}/user/two_factor">{{.i18n.Tr "u2f_use_twofa"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "user/auth/u2f_error" .}}
|
|
{{template "base/footer" .}}
|