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

credentials.create should default to ES256 if options.pubKeyCredParams is empty #1383

Closed
nsatragno opened this issue Mar 5, 2020 · 1 comment · Fixed by #1387
Closed

Comments

@nsatragno
Copy link
Member

On [[Create]] method, step 9:

if credTypesAndPubKeyAlgs is empty and options.pubKeyCredParams is not empty, return a DOMException whose name is "NotSupportedError", and terminate this algorithm.

"NotSupportedError" should be returned if credTypesAndPubKeyAlgs is empty regardless of whether options.pubKeyCredParams is empty or not. This is because an empty list will fail when sent to authenticators anyway (step 2 of the authenticatorMakeCredential operation), so there is no point in sending the empty list.

At the moment chrome is immediately throwing NotSupportedError (which doesn't match the spec, it should wait for the user to tap an authenticator and return NotAllowedError instead) and firefox is defaulting to { type: "public-key", alg: -7 }

@nsatragno nsatragno self-assigned this Mar 5, 2020
@nadalin nadalin added this to the L2-WD-03 milestone Mar 11, 2020
@nsatragno
Copy link
Member Author

On the 2020-03-11 call, we discussed this issue and resolved to default to E256 if the list is empty. I'll upload a PR.

@nsatragno nsatragno changed the title credentials.create should fail with "NotSupportedError" if options.pubKeyCredParams is empty credentials.create should default to ES256 if options.pubKeyCredParams is empty Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants