From 35c3553870e35b2e7cfcc599645791acda6afcef Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 14 Jan 2022 23:03:31 +0800 Subject: Support webauthn (#17957) Migrate from U2F to Webauthn Co-authored-by: Andrew Thornton Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang --- routers/web/auth/linkaccount.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/web/auth/linkaccount.go') diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go index 9d5a6eb3f8..27eb954a58 100644 --- a/routers/web/auth/linkaccount.go +++ b/routers/web/auth/linkaccount.go @@ -172,10 +172,10 @@ func linkAccount(ctx *context.Context, u *user_model.User, gothUser goth.User, r log.Error("Error storing session: %v", err) } - // If U2F is enrolled -> Redirect to U2F instead - regs, err := auth.GetU2FRegistrationsByUID(u.ID) + // If WebAuthn is enrolled -> Redirect to WebAuthn instead + regs, err := auth.GetWebAuthnCredentialsByUID(u.ID) if err == nil && len(regs) > 0 { - ctx.Redirect(setting.AppSubURL + "/user/u2f") + ctx.Redirect(setting.AppSubURL + "/user/webauthn") return } -- cgit v1.2.3