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

Allow app/twiddle to access localStorage #649

Open
jacobq opened this issue Dec 17, 2018 · 5 comments
Open

Allow app/twiddle to access localStorage #649

jacobq opened this issue Dec 17, 2018 · 5 comments

Comments

@jacobq
Copy link
Contributor

jacobq commented Dec 17, 2018

I was trying to make a repro repo for the ember-localstorage-adapter using ember-twiddle, but it seems that the app is "sandboxed" or otherwise disallowed from accessing localStorage. I assume this is related to some kind of security concern. Is there a way to work around it? (e.g. set a flag in the config or something?)

https://ember-twiddle.com/d526982f42a741ee1379bbb76c2548c1?openFiles=routes.application.js%2C

@Gaurav0
Copy link
Contributor

Gaurav0 commented Dec 18, 2018

Sandboxed iframes cannot access localStorage.

@knownasilya
Copy link
Contributor

Give codesandbox a try for this scenario.

@jacobq
Copy link
Contributor Author

jacobq commented Dec 20, 2018

Sandboxed iframes cannot access localStorage.

And the iframe must always be sandboxed?

@Gaurav0
Copy link
Contributor

Gaurav0 commented Dec 20, 2018

You don't want to worry about opening an evil twiddle that does something to your Github account, right?

@jacobq
Copy link
Contributor Author

jacobq commented Dec 20, 2018

You don't want to worry about opening an evil twiddle that does something to your Github account, right?

As long as I had to click an "OK, hack me" button first (or alternatively if it would only allow it for my own twiddles) then I would be OK with that. Ideally, there'd be a way to grant permissions in a more granular way than all or nothing. e.g. allow-storage-access-by-user-activation (see sandbox section of https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)

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

No branches or pull requests

3 participants