Skip to content

Commit

Permalink
log debug info in FinishLogin
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Nov 7, 2024
1 parent 2e31087 commit f56d3db
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 @@ -349,7 +349,11 @@ func (u *DynamoUser) FinishLogin(r *http.Request) (*webauthn.Credential, error)
br := fixEncoding(body)
parsedResponse, err := protocol.ParseCredentialRequestResponseBody(br)
if err != nil {
log.Printf("failed to parse credential request response body: %s", err)
var protocolError *protocol.Error
if errors.As(err, &protocolError) {
log.Printf("failed to parse credential request response body: %s", body)
log.Printf("ProtocolError: %s, DevInfo: %s", protocolError.Details, protocolError.DevInfo)
}
return &webauthn.Credential{}, fmt.Errorf("failed to parse credential request response body: %s", err)
}

Expand Down

0 comments on commit f56d3db

Please sign in to comment.