lbuchs / WebAuthn

A simple PHP WebAuthn (FIDO2/Passkey) server library
https://webauthn.lubu.ch
MIT License
458 stars 82 forks source link

No @ character support in username #48

Closed ro78 closed 2 years ago

ro78 commented 2 years ago

Hi!

Using your demo code with no change, when I register a device with demo@demo.com username, my phone (iOS and iPadOS up to date) returns demodemocom as username when I login (in the list of identities I need to select to authenticate).

Can it be improved ?

Romain

lbuchs commented 2 years ago

jep on the demo app it's trimming all chars except a-Z 0-9. It's just the demo app, there is no limitation by the library. But jep I can allow @.-_ in a future version too.

ro78 commented 2 years ago

Can you tell me where it’s trimmed please?

lbuchs commented 2 years ago

https://github.com/lbuchs/WebAuthn/blob/cb4ee422eda057e25454c4ac67988b1c037c935e/_test/server.php#L51