forgejo-aneksajo/models/auth
Gusted 5d7953def4
fix(sec): consider webauthn for external login
- Currently during external login (such as OAuth2), if the user is
enrolled into Webauthn and not enrolled into TOTP then no 2FA is being
done during external login and when account linking is set to `auto` then
also during automatic linking. This results in bypassing the 2FA of the
user.
- Create a new unified function that checks if the user is enrolled into
2FA and use this when necessary. Rename the old `HasTwoFactorByUID`
function to `HasTOTPByUID` which is a more appropiate naming.

(cherry picked from commit df5d656827)

Conflicts:
  the original commit was trimmed down to be fit for backport
2025-05-02 07:31:20 +02:00
..
TestOrphanedOAuth2Applications test: Global OAuth should not be deleted 2024-11-23 19:49:55 +01:00
access_token.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
access_token_scope.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
access_token_scope_test.go [GITEA] silently ignore obsolete sudo scope 2024-02-05 16:05:50 +01:00
access_token_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
auth_token.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
main_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
oauth2.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
oauth2_list.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
oauth2_test.go [v11.0/forgejo] chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7649) 2025-04-25 09:59:30 +00:00
session.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
session_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
source.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
source_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
two_factor.go fix(sec): consider webauthn for external login 2025-05-02 07:31:20 +02:00
two_factor_test.go fix(sec): consider webauthn for external login 2025-05-02 07:31:20 +02:00
twofactor.go fix(sec): consider webauthn for external login 2025-05-02 07:31:20 +02:00
webauthn.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
webauthn_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00