mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
Allow U2F 2FA without TOTP (#11573)
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
This commit is contained in:
@@ -12,9 +12,11 @@
|
||||
<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>
|
||||
<div class="ui attached segment">
|
||||
<a href="{{AppSubUrl}}/user/two_factor">{{.i18n.Tr "u2f_use_twofa"}}</a>
|
||||
</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>
|
||||
|
Reference in New Issue
Block a user