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

Configure Freighter to "allow_frames" #1838

Open
aristidesstaffieri opened this issue Feb 5, 2025 · 1 comment
Open

Configure Freighter to "allow_frames" #1838

aristidesstaffieri opened this issue Feb 5, 2025 · 1 comment
Labels
triage Determining where this fits into upcoming work

Comments

@aristidesstaffieri
Copy link
Contributor

What problem does your feature solve?

Some applications, like Unity WebGL apps, could require communication between Freighter's API and an iframe. We currently do not allow frames.

Is this a valid use case?
What are the security implications of this change?

What would you like to see?

Freighter configured to "allow_frames"

What alternatives are there?

Not turning this on.

@towa-hi
Copy link

towa-hi commented Feb 7, 2025

We're building a Unity WebGL app hosted on itch.io. Itch.io serves apps from a separate domain (html-classic.itch.zone) in an iframe, preventing our freighter-sdk from communicating with the Freighter extension unless "allow_frames" is true for contentScript.min.js. Basically all sites that host webGL browser apps work like this.

Directing users to the hosted URL within itch.io's iframe works but is inconvenient. Enabling allow_frames in the manifest would let Unity (and all WebGL) apps in iframes connect to the Freighter extension without requiring self-hosting.

I don't know what the security implications are, but Metamask enables allow_frames in its manifest, and WebGL apps on itch.io connect to the Metamask extension without issue.

I've tested the change and confirmed our issue is specifically due to allow_frames. The attached image shows our app invoking setAllowed() from within an iframe after updating the manifest.

Image

@aristidesstaffieri aristidesstaffieri added the triage Determining where this fits into upcoming work label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Determining where this fits into upcoming work
Projects
None yet
Development

No branches or pull requests

2 participants