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

Consider window.parent when iframe URL is a blob URL #244

Open
Sidsector9 opened this issue Sep 23, 2024 · 2 comments
Open

Consider window.parent when iframe URL is a blob URL #244

Sidsector9 opened this issue Sep 23, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Sidsector9
Copy link

We are trying to load Digital Wallets inside an iframe which has its src set to a blob URL.
Due to this, Square throws the following error:

WebSdkEmbedError: Web Payments SDK can only be embedded on sites that use HTTPS and have a secure context

Is it possible to consider window.parent when checking for protocol when the src of the iframe is a blob URL?

@theartoflogic
Copy link
Collaborator

Hi @Sidsector9, we're going to be moving away from checking window.location.protocol soon and instead rely on checking window.isSecureContext to verify that the Web Payments SDK is loaded within a secure context across the entire page hierarchy.

Once this change is made it should resolve this issue as well, as long as the parent hierarchy of the iframe is secure, since window.isSecureContext is true within an iframe using a blob URL src value (JSFiddle)

@Sidsector9
Copy link
Author

Thanks for the quick response @theartoflogic
Is there any way for us to track this release so that we can then proceed with updates on our end?

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

No branches or pull requests

2 participants