Closed lukepolo closed 5 months ago
I see you're using server@10 but browser@9. I wonder if something during hybrid is falling over because user.id ends up greater than 64 bytes coming out of generateRegistrationOptions()
. browser@9 treats user.id
as a UTF-8 string, it's browser@10 that will correctly base64url-decode user.id
to <= 64 bytes.
Can you provide the output of that call to generateRegistrationOptions()
? I think that'll help troubleshoot things further.
Blah I’m sorry I copied it from the diff , browser was 10 , I’ll get that output here soon
updated to show thati was using the 10 V for the browser, let me see if i can get the output
// Registration Options
{
"challenge": "B6pyIkuOvFU8tor2nDSs6aYyMEdrcws-P4KsVB6m6Ww",
"rp": {
"name": "EXTRACTED",
"id": "EXTRACTED.loca.lt"
},
"user": {
"id": "MHlWTmtiWDAwRnI",
"name": "lpolicinski@EXTRACTED.com",
"displayName": ""
},
"pubKeyCredParams": [
{
"alg": -8,
"type": "public-key"
},
{
"alg": -7,
"type": "public-key"
},
{
"alg": -257,
"type": "public-key"
}
],
"timeout": 60000,
"attestation": "direct",
"excludeCredentials": [],
"authenticatorSelection": {
"residentKey": "required",
"userVerification": "required",
"requireResidentKey": true
},
"extensions": {
"credProps": true
}
}
i went to https://webauthn.io/ the i noticed it had displayName
set. so i added it and now it works. May want to mark that as non optional now?
Whoops, this is a case of me getting out ahead of browsers updating to reflect the latest behavior in the draft of WebAuthn L3 (we changed things to make it okay for displayName to be an empty string https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname.) I must have caused this when I addressed https://github.com/MasterKale/SimpleWebAuthn/issues/536. It seems I'll have to revert that change for now 😞
Hello @lukepolo, I confirmed the behavior on my end:
Setting a value for userDisplayName
when calling generateRegistrationOptions()
fixed it for me too:
I'll work to get a fix out for this over the weekend, thanks for your patience.
Hi @lukepolo thanks for Highlighting this. I also currently have this problem. @MasterKale Thanks for your prompt reaction to this ❤️.
Hey all, I asked around last week and ended up reporting this as a Chromium issue here:
https://issues.chromium.org/issues/346835891
I'm still considering updating SimpleWebAuthn, but I also might just document this as a known issue with Chrome and advise RPs to set displayName
to a non-empty string till Chrome gets fixed.
Alright, I got around to updating the docs with temporary troubleshooting info for this issue:
I'll update the guidance once the Chromium bug gets fixed (it'll stick around but at least I can say "this only affects Chrome older than xxx".)
I'm going to close this out for now. Thanks again for your patience.
Describe the issue
Reproduction Steps
A bit difficult , but follow upgrade guide from 9 -> 10, i had to change where my "crednetialID" and userHandlel and I am using a custom 'userID' (which does seem to decode correctly after coming back to the client
isoBase64URL.toUTF8String(request.body.response.userHandle)
Expected behavior
I expected the same process to work when phone trys create the passkey.
Code Samples + WebAuthn Options and Responses
10.x
9.x
registration options:
verify
Dependencies
SimpleWebAuthn Libraries
"@simplewebauthn/server@^10.0.0": version "10.0.0" resolved "https://npm.qumulex.tech/@simplewebauthn%2fserver/-/server-10.0.0.tgz#b7a08b91e60c2811c5858bf047c215a4fa937026" integrity sha512-w5eIoiF7ltg1sgggjY5Tx654j+DBuyEx2B3869jjmPp0xl2Z4BUP4kJ3yJ6DnZIv+ZYYntT3E6nZXNjPOQbrtw==
"@simplewebauthn/browser@^10.0.0": version "10.0.0" resolved "https://npm.qumulex.tech/@simplewebauthn%2fbrowser/-/browser-10.0.0.tgz#8305a57dacb35ab6a71a8b670c699ee7ef1c11c4" integrity sha512-hG0JMZD+LiLUbpQcAjS4d+t4gbprE/dLYop/CkE01ugU/9sKXflxV5s0DRjdz3uNMFecatRfb4ZLG3XvF8m5zg==
Additional context
Safari + Iphone work and able to register and verify etc after saved to DB and what not. Other pass keys such as 1password / chrome profile also work.
I know this isn't perfect information, if needed i can supply more information but i hope someone else is having an issue upgrading