Skip to content

Commit

Permalink
fix: error hidden during discoverable login (#142)
Browse files Browse the repository at this point in the history
This exposes the underlying error as a string. There needs to be some additional work in this area regardless as the idea would be to wrap the error but the current implementation doesn't explicitly implement this.

Fixes #140
  • Loading branch information
james-d-elliott committed Jun 19, 2023
1 parent 17a35bb commit a942e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webauthn/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (webauthn *WebAuthn) ValidateDiscoverableLogin(handler DiscoverableUserHand

user, err := handler(parsedResponse.RawID, parsedResponse.Response.UserHandle)
if err != nil {
return nil, protocol.ErrBadRequest.WithDetails("Failed to lookup Client-side Discoverable Credential")
return nil, protocol.ErrBadRequest.WithDetails(fmt.Sprintf("Failed to lookup Client-side Discoverable Credential: %s", err))
}

return webauthn.validateLogin(user, session, parsedResponse)
Expand Down

0 comments on commit a942e60

Please sign in to comment.