mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-08 09:44:00 +09: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user