summaryrefslogtreecommitdiffstats
path: root/models/login/u2f_test.go
diff options
context:
space:
mode:
authorKamil DomaƄski <kamil@domanski.co>2021-11-08 23:47:19 +0100
committerGitHub <noreply@github.com>2021-11-08 23:47:19 +0100
commit021df29623bb0155b5a2ccad0e5f90fb348c8f4e (patch)
treec720bc34bd29620028c51d35c6d98044af89101e /models/login/u2f_test.go
parenta3f9e9234cbb099b821a6ea9c575927be18948de (diff)
downloadgitea-021df29623bb0155b5a2ccad0e5f90fb348c8f4e.tar.gz
gitea-021df29623bb0155b5a2ccad0e5f90fb348c8f4e.zip
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
Diffstat (limited to 'models/login/u2f_test.go')
-rw-r--r--models/login/u2f_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/login/u2f_test.go b/models/login/u2f_test.go
index 32505b62a6..8f5cea6150 100644
--- a/models/login/u2f_test.go
+++ b/models/login/u2f_test.go
@@ -29,7 +29,7 @@ func TestGetU2FRegistrationByID(t *testing.T) {
func TestGetU2FRegistrationsByUID(t *testing.T) {
assert.NoError(t, db.PrepareTestDatabase())
- res, err := GetU2FRegistrationsByUID(1)
+ res, err := GetU2FRegistrationsByUID(32)
assert.NoError(t, err)
assert.Len(t, res, 1)