Skip to content

Commit

Permalink
fix(webauthn): handle error when removing webauthn credential (#7689)
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyifyj authored Dec 25, 2024
1 parent c218b57 commit 5ecf5e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/handles/webauthn.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ func DeleteAuthnLogin(c *gin.Context) {
return
}
err = db.RemoveAuthn(user, req.ID)
if err != nil {
common.ErrorResp(c, err, 400)
return
}
err = op.DelUserCache(user.Username)
if err != nil {
common.ErrorResp(c, err, 400)
Expand Down

0 comments on commit 5ecf5e8

Please sign in to comment.