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

[Spec] Remove references to create in cross origin iframe #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephenmcgruer
Copy link
Collaborator

@stephenmcgruer stephenmcgruer commented Feb 7, 2025

The WebAuthn specification now allows credential creation in a cross origin iframe, as of w3c/webauthn#1801. As such, SPC no longer needs to override or add this behavior.

We do retain (for now) the ability for the "payment" permission policy to allow credential create in an iframe, instead of requiring "publickey-credentials-create". This should be removed one day, but one small step to unification at a time :).

There is a small web-compat issue here. In the case of no transient user activation, the SPC specification used to throw a SecurityError error. However WebAuthn throws a NotAllowed error instead. See also Chrome bug https://crbug.com/41484826

Fixes #267


Preview | Diff

The WebAuthn specification now allows credential creation in a cross origin
iframe, as of w3c/webauthn#1801. As such, SPC no longer
needs to override or add this behavior.

We do retain (for now) the ability for the `"payment"` permission policy to
allow credential create in an iframe, instead of requiring
`"publickey-credentials-create"`. This should be removed one day, but one
small step to unification at a time :).

There is a small web-compat issue here. In the case of no transient user
activation, the SPC specification used to throw a `SecurityError` error.
However WebAuthn throws a `NotAllowed` error instead. See also Chrome bug
https://crbug.com/41484826

Fixes #267
@stephenmcgruer stephenmcgruer force-pushed the remove-create-in-cross-origin-iframe branch from 4728e88 to 9ada5e5 Compare February 7, 2025 18:54
@stephenmcgruer
Copy link
Collaborator Author

This one might warrant some discussion in the WPWG, really just as a heads up to the changing error type - which will only happen for realz when we fix https://crbug.com/41484826 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update SPC spec to reflect that credential create in cross-origin iframe is now allowed in WebAuthn
3 participants