question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow app/twiddle to access localStorage

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
knownasilyacommented, Dec 18, 2018

Give codesandbox a try for this scenario.

0reactions
jacobqcommented, 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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window.localStorage - Web APIs | MDN
The localStorage read-only property of the window interface allows you to access a Storage object for the Document's origin; the stored data ...
Read more >
Using localStorage with React Hooks - LogRocket Blog
In this guide, we cover how to use localStorage to persist a user's form input in the browser storage using React Hooks. We'll...
Read more >
localStorage - use getItem/setItem functions or access object ...
One uses encapsulation (getter/setter) to better protect the data and for simple usage. You're supposed to use this style (for security). The other...
Read more >
LocalStorage, sessionStorage - The Modern JavaScript Tutorial
Web storage objects localStorage and sessionStorage allow to save ... In that case getItem/setItem work fine, while object-like access fails ...
Read more >
How to Use localStorage with React Hooks to Set and Get Items
localStorage is a web storage object that allows JavaScript sites and apps to keep key-value pairs in a web browser with no expiration...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found