Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlarocque/safari-iframe-localstorage
https://github.com/dlarocque/safari-iframe-localstorage
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dlarocque/safari-iframe-localstorage
- Owner: dlarocque
- Created: 2024-08-02T20:29:54.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-06T15:41:56.000Z (5 months ago)
- Last Synced: 2024-11-07T12:17:17.699Z (2 months ago)
- Language: HTML
- Size: 522 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Safari iframe localStorage
This is an attempt to reproduce a Safari iframe localStorage synchronization issue from Safari 9.
## Steps
First, make sure you've checked out the changes in the PR, built the SDK, and ran `yarn link` in both `packages/firebase` and `packages/auth`.
1. Install dependencies and link: `yarn && cd iframe-app && yarn && yarn link firebase @firebase/auth && cd -`
1. Copy your firebase config to `iframe-app/.env` (or hard code it, if that's easier).
```
# Sample .env
REACT_APP_API_KEY=xx
REACT_APP_AUTH_DOMAIN=xx
REACT_APP_DATABASE_URL=xx
REACT_APP_PROJECT_ID=xx
REACT_APP_STORAGE_BUCKET=xx
REACT_APP_MESSAGING_SENDER_ID=xx
REACT_APP_APP_ID=1:xx
```
1. Start the top-level app: `HOST=127.0.0.1 yarn start`
1. Start the iframe-app: `cd iframe-app && HOST=localhost yarn start`
1. Open the top-level app in two tabs in Safari
1. In one of the tabs, sign in with a popup by clicking the button
1. Once signed in, observe that localStorage in the iframe in both tabs are in sync. If this is not the case, **please** reach out to [email protected] and share what you've observed.