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

Align RP ID string types #2074

Closed
wants to merge 2 commits into from
Closed

Align RP ID string types #2074

wants to merge 2 commits into from

Conversation

emlun
Copy link
Member

@emlun emlun commented May 20, 2024

rp.id in PublicKeyCredentialCreationOptions and rpId in PublicKeyCredentialRequestOptions represent the same thing, but with different types. The WG agreed on the 2024-05-15 call that both should be 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.

Fixes #2066.


Preview | Diff

`rp.id` in `PublicKeyCredentialCreationOptions` and `rpId` in
`PublicKeyCredentialRequestOptions` represent the same thing, but with
different types. The WG agreed on the 2024-05-15 call that both should
be `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.
@emlun emlun added this to the L3-WD-02 milestone May 20, 2024
@emlun emlun self-assigned this May 20, 2024
Copy link
Member

@nsatragno nsatragno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks!

Copy link
Member

@timcappalli timcappalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MasterKale
Copy link
Contributor

From the WG @ 7/10: I don't have an objection to making this change, but it will mean that PublicKeyCredentialRequestOptionsJSON will define a combination of DOMString and USVString strings. We're exploring whether or not we need to update all DOMString in ...JSON dictionaries to USVString

@MasterKale
Copy link
Contributor

Alternative strategy: define a PublicKeyCredentialRpEntityJSON that specifies DOMString so all the ...JSON dictionaries specify a consistent type for strings.

@emlun
Copy link
Member Author

emlun commented Jul 10, 2024

2024-07-10 WG call: We'll revert the change to PublicKeyCredentialRequestOptionsJSON and add PublicKeyCredentialRpEntityJSON as described above.

@emlun
Copy link
Member Author

emlun commented Jul 17, 2024

I made the changes discussed on last week's WG call, but doing that made me question if this was actually the correct resolution. I now believe it is not, and I propose abandoning this PR in favour of the alternative resolution in #2098. See #2098 for expanded discussion and rationale.

@emlun emlun marked this pull request as draft July 17, 2024 18:10
@emlun emlun closed this Jul 17, 2024
@emlun emlun deleted the issue-2066-usvstring branch October 7, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make PublicKeyCredentialRequestOptions.rpId a DOMString
5 participants