diff options
Diffstat (limited to 'routers/web/auth')
-rw-r--r-- | routers/web/auth/webauthn.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/auth/webauthn.go b/routers/web/auth/webauthn.go index 50dcb919e5..b9e8de2ac0 100644 --- a/routers/web/auth/webauthn.go +++ b/routers/web/auth/webauthn.go @@ -5,7 +5,7 @@ package auth import ( - "encoding/base64" + "encoding/base32" "errors" "net/http" @@ -131,7 +131,7 @@ func WebAuthnLoginAssertionPost(ctx *context.Context) { } // Success! Get the credential and update the sign count with the new value we received. - dbCred, err := auth.GetWebAuthnCredentialByCredID(base64.RawStdEncoding.EncodeToString(cred.ID)) + dbCred, err := auth.GetWebAuthnCredentialByCredID(user.ID, base32.HexEncoding.EncodeToString(cred.ID)) if err != nil { ctx.ServerError("GetWebAuthnCredentialByCredID", err) return |