]> source.dussan.org Git - gitea.git/commit
Allow U2F 2FA without TOTP (#11573)
authorKamil Domański <kamil@domanski.co>
Mon, 8 Nov 2021 22:47:19 +0000 (23:47 +0100)
committerGitHub <noreply@github.com>
Mon, 8 Nov 2021 22:47:19 +0000 (23:47 +0100)
commit021df29623bb0155b5a2ccad0e5f90fb348c8f4e
treec720bc34bd29620028c51d35c6d98044af89101e
parenta3f9e9234cbb099b821a6ea9c575927be18948de
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
12 files changed:
models/fixtures/u2f_registration.yml
models/fixtures/user.yml
models/login/twofactor.go
models/login/u2f.go
models/login/u2f_test.go
models/user_test.go
options/locale/locale_en-US.ini
routers/web/user/auth.go
routers/web/user/setting/security.go
templates/user/auth/u2f.tmpl
templates/user/settings/security_twofa.tmpl
templates/user/settings/security_u2f.tmpl