mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-25 10:30:50 +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:
parent
a3f9e9234c
commit
021df29623
12 changed files with 100 additions and 57 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue