teamhanko / passkeys

FIDO2-certified passkey server and SDKs for adding passkey support to any auth system
https://hanko.io/passkey-api
GNU Affero General Public License v3.0
115 stars 8 forks source link

Bug: fix DTO validation for discoverable logins #69

Closed shentschel closed 4 months ago

shentschel commented 4 months ago

Issue

If you try to do a login/initialize with for a passkey there is a bug in which you get a BAD REQUEST error when not sending an empty JSON body for a discoverable login due to checking the LoginDTO.

Expected Result

Discoverable Logins don't need a DTO check to work.

shentschel commented 4 months ago

The only way I can reproduce this behaviour is, when I send an empty json array as payload which is indeed a malformed request.