Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error hidden during discoverable login #142

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: error hidden during discoverable login
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.
  • Loading branch information
james-d-elliott committed May 30, 2023
commit ebc7e32f5f70f373d7c053827e62c0dd47f3de70
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