webauthn
webauthn copied to clipboard
Make PublicKeyCredentialRequestOptions.rpId a DOMString
Both PublicKeyCredentialRpEntity.id
and PublicKeyCredentialRequestOptions.rpId
represent the same thing (i.e., RP ID); however the former is modeled as a DOMString
while the latter is modeled as a USVString
. These should be the same type. Specifically PublicKeyCredentialRequestOptions.rpId
should be a DOMString
as well or PublicKeyCredentialRpEntity.id
should be a USVString
. Should be noted that PublicKeyCredentialRequestOptionsJSON.rpId
is already a DOMString
.
Thanks for pointing this out!
2024-05-15 WG call: Agreed we should change PublicKeyCredentialRpEntity.id
to USVString
. Strictly speaking this is a breaking change (changing a type bound in input (contravariant) position to be more restrictive), but in practice this shouldn't be able to break any applications since then those credentials wouldn't have worked in get()
anyway.
@jschanck Seeing as Firefox is the browser that makes the most actual use of WebIDL - would changing PublicKeyCredentialRpEntity.id
to USVString
be a problem for Firefox?
No, that wouldn't be a problem.
PublicKeyCredentialRequestOptionsJSON.rpId
should also be changed to a USVString
too.