Skip to content

Commit

Permalink
log debug detail for ValidateLogin
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Nov 7, 2024
1 parent f56d3db commit 040b045
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion user.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ func (u *DynamoUser) FinishLogin(r *http.Request) (*webauthn.Credential, error)

credential, err := u.WebAuthnClient.ValidateLogin(u, u.SessionData, parsedResponse)
if err != nil {
log.Printf("failed to validate login: %s", err)
var protocolError *protocol.Error
if errors.As(err, &protocolError) {
log.Printf("failed to validate login, ProtocolError: %s, DevInfo: %s",
protocolError.Details, protocolError.DevInfo)
}
return &webauthn.Credential{}, fmt.Errorf("failed to validate login: %s", err)
}

Expand Down

0 comments on commit 040b045

Please sign in to comment.