Storage Access API (for embedded SSO)
Lets an embedded iframe ask for its own cookies back on third party pages.
In one line
Can ask to get its own cookies back when shown inside another site
Lets an embedded iframe ask for its own cookies back on third party pages.
Restores a login cookie inside an embed with a browser prompt. Used for SSO widgets and embedded apps.
What it can and can't do
What the user does: You tap a sign in or sign up button inside an embedded widget
It can
- Show a browser prompt asking to let the embedded site use its own cookies
- Keep you signed in inside the embed after you allow it
- Support sign in widgets and embedded apps
It cannot
- Use its cookies in the embed before you tap and allow
- See cookies from other sites
- Get the access if you tap Don't allow
How it differs between platforms: Chrome, Safari and Firefox all support it, but each decides when to show the prompt or allow it automatically.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 119 | 2023-10-31 | None |
| Edge | Supported | 85 | 2020-08-27 | None |
| Firefox | Supported | 65 | 2019-01-29 | None |
| Safari | Supported | 11.1 | 2018-04-12 | Client-side storage access is granted per-page (<a href="https://developer.mozilla.org/docs/Web/API/Storage\_Access\_API\#how\_it\_works:\~:text=In%20older%20spec%20v |
| Safari on iPhone | Supported | 11.3 | 2018-03-29 | Client-side storage access is granted per-page (<a href="https://developer.mozilla.org/docs/Web/API/Storage\_Access\_API\#how\_it\_works:\~:text=In%20older%20spec%20v |
| Chrome on Android | Supported | 120 | 2023-12-05 | None |
| Samsung Internet | Supported | 25.0 | 2024-04-24 | None |
How a site asks for it
| API | document.requestStorageAccess(), hasStorageAccess(), requestStorageAccessFor() |
| Permissions policy | storage-access |
| Browser compat keys | api.Document.requestStorageAccess |
| How access is granted | prompt |
| What the user sees | Browser prompt to let embedded site use cookies on the host site |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per origin |
| How to take it back | Site settings |
| Inside an iframe | Same as top level; cross-origin iframes need a permissions policy where listed |
Typical flow
- Call the API
- Browser applies its access rules
- Page receives the result
Data you get
What comes back: Lets an embedded iframe ask for its own cookies back on third party pages.
Shape: object
How often: on demand
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
granted | boolean | None | true or false | Not listed |
Technical limits
- User gesture needed
- Only the cookie jar of the embedded origin
- Safari asks for prior first party interaction
The story
What it is
An embedded widget on another site can ask to get its own cookies back.
For you
A small box appears over an embedded sign in or comment widget asking if the site can use its saved cookies. You may also be asked to click inside the widget first. If you say no, the widget asks you to sign in again.
For makers
Browsers block third party cookies, which breaks embedded logins, comments, video players and chat. This API lets those widgets work again with consent, so a single sign on box inside another site still recognizes the person.
Where you see it
| Type | Example | Apps |
|---|---|---|
| video | A video site embeds a player on a partner page and asks for access so a subscriber is recognized and ads are skipped. | YouTube embeds |
| social | A comment or like widget on a news site asks to use its cookies so a person's account shows without signing in again. | Disqus, Facebook plugins |
| productivity | A shared office app embedded inside another tool needs it to open the same signed in workspace. | Microsoft 365 embeds |
| games | A game embedded on a portal site uses it to keep a player signed in to the game publisher's account. | None named |
| shopping | A payment or login iframe asks for its cookies so a saved card stays available. | None named |
| ads | Ad and measurement frames also ask for cookies, so browsers show a prompt and block the request unless the person interacts. | None named |
Risks
- Embedded party can track you across sites
- Prompt confusion
What the platform says
- Apple WebKit: Storage Access API. WebKit introduced it so embedded content can ask for cookie access after a person interacts, instead of tracking by default.
- MDN (standards docs): Storage Access API. Describes how an embedded frame can request access to its own cookies, usually after a click and sometimes a prompt.
Good uses and abuse
Legitimate uses
- Embedded login
Known abuse
- Cross site tracking when granted
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2018, Safari 11.1: Storage Access API ships in Safari
- 2019, Firefox 65: Firefox support
- 2023-10, Chrome 119: Chrome support
Sources
How well checked: Checked against real behavior.