https://github.com/stevehobbsdev/isolated-local-storage
An example of storing values in local storage on a different origin
https://github.com/stevehobbsdev/isolated-local-storage
Last synced: 3 months ago
JSON representation
An example of storing values in local storage on a different origin
- Host: GitHub
- URL: https://github.com/stevehobbsdev/isolated-local-storage
- Owner: stevehobbsdev
- Created: 2019-10-18T13:58:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T09:54:49.000Z (over 3 years ago)
- Last Synced: 2024-12-31T20:16:00.988Z (over 1 year ago)
- Language: HTML
- Size: 104 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Isolated Local Storage Example
An example of how to perform local storage access isolated by origin. It uses a hidden iframe to marshal access to local storage to store (fictional) token values.
The sample starts two Express servers running on two different origins: `http://localhost:4001` (app) and `http://localhost:4002` (private). The app communicates with the private origin through the iframe to perform read and write operations on local storage.
## Running the app
To start both the app and the "private" origin, run:
```
yarn start
```
Then [open your browser at http://localhost:4001](http://localhost:4001) to view the app.
## Reference
https://pragmaticwebsecurity.com/talks/browsersecrets.html