You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue was brought up in past discussions around CredMan. If needed, I can dig up the related discussions. I believe the required keyword on IDL is omitted due to the need to integrate with CredMan. @mikewest probably has better memory about this. The argument is that it is ok for the keyword to be omitted as long as a DOM Exception error would be thrown.
On the code level, I believe the expectation is that instead of JS throwing a type error due to missing parameter, it now throws a DOM Exception error.
As for documentation, MDN just needs the document the difference.
this is a good question. I attempted to find discussion about this in the public-webauthn archives but could not. I'm curious about the rationale details (I do not recall this discussion).
It appears the requisite DOM exception is indeed thrown in #createCredential step 3.
The RP and User dictionary both inherit from the same parent dictionary. Name is a common field that is shared between both dictionaries. But displayName and id are two fields that aren't shared. We decided to remove the required keyword and let JS throw the TypeError so that the inheritance would be clearer.
If a developer miss any of the required parameters listed in #createCredential step 3, a TypeError would be thrown. TypeError is the same error that will be thrown if there's a required keyword on the IDL. There will be a small difference about the order of when the error is thrown. If the required keyword is on the IDL, the error would likely be thrown first (depending on JS engine design). If the JS is checking whether the parameter is present, the error would likely be thrown after other checks. Either way, there is no difference for web developers.
https://w3c.github.io/webauthn/#dictionary-makecredentialoptions
The text says that the "name" field for both the rp and user are required. Should the IDL reflect that?
Same question for the "displayName" field for user.
The text was updated successfully, but these errors were encountered: