aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/auth/webauthn.go
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 04:20:58 +0200
committerGitHub <noreply@github.com>2022-06-26 21:20:58 -0500
commit004859581148bf8f404599e143932236cb8122a5 (patch)
treeb541ef049bace3e97fd963ac51b335e85a541483 /routers/web/auth/webauthn.go
parent5d3f99c7c6d0f2c304dc13c6fa6aa675daf310cc (diff)
downloadgitea-004859581148bf8f404599e143932236cb8122a5.tar.gz
gitea-004859581148bf8f404599e143932236cb8122a5.zip
Remove U2F support (#20141)
- Completely remove U2F support from 1.18.0, 1.17.0 will be the last release that U2F is somewhat supported. Users who used U2F would already be warned about using U2F for a while now and should hopefully already be migrated. But starting 1.18 definitely remove it.
Diffstat (limited to 'routers/web/auth/webauthn.go')
-rw-r--r--routers/web/auth/webauthn.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/routers/web/auth/webauthn.go b/routers/web/auth/webauthn.go
index c0cf58f3d3..4778c9a9a3 100644
--- a/routers/web/auth/webauthn.go
+++ b/routers/web/auth/webauthn.go
@@ -67,10 +67,7 @@ func WebAuthnLoginAssertion(ctx *context.Context) {
return
}
- // FIXME: DEPRECATED appid is deprecated and is planned to be removed in v1.18.0
- assertion, sessionData, err := wa.WebAuthn.BeginLogin((*wa.User)(user), webauthn.WithAssertionExtensions(protocol.AuthenticationExtensions{
- "appid": setting.U2F.AppID,
- }))
+ assertion, sessionData, err := wa.WebAuthn.BeginLogin((*wa.User)(user))
if err != nil {
ctx.ServerError("webauthn.BeginLogin", err)
return
@@ -159,12 +156,5 @@ func WebAuthnLoginAssertionPost(ctx *context.Context) {
}
_ = ctx.Session.Delete("twofaUid")
- // Finally check if the appid extension was used:
- if value, ok := parsedResponse.ClientExtensionResults["appid"]; ok {
- if appid, ok := value.(bool); ok && appid {
- ctx.Flash.Error(ctx.Tr("webauthn_u2f_deprecated", dbCred.Name))
- }
- }
-
ctx.JSON(http.StatusOK, map[string]string{"redirect": redirect})
}