Skip to Content
Platform.Ontology

Storage Access API (for embedded SSO)

Lets an embedded iframe ask for its own cookies back on third party pages.

Asks you firstSign in and identityCross siteWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported1192023-10-31None
EdgeSupported852020-08-27None
FirefoxSupported652019-01-29None
SafariSupported11.12018-04-12Client-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 iPhoneSupported11.32018-03-29Client-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 AndroidSupported1202023-12-05None
Samsung InternetSupported25.02024-04-24None

How a site asks for it

APIdocument.requestStorageAccess(), hasStorageAccess(), requestStorageAccessFor()
Permissions policystorage-access
Browser compat keysapi.Document.requestStorageAccess
How access is grantedprompt
What the user seesBrowser prompt to let embedded site use cookies on the host site
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsPer origin
How to take it backSite settings
Inside an iframeSame as top level; cross-origin iframes need a permissions policy where listed

Typical flow

  1. Call the API
  2. Browser applies its access rules
  3. 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

FieldTypeUnitRangePrecision
grantedbooleanNonetrue or falseNot 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

TypeExampleApps
videoA video site embeds a player on a partner page and asks for access so a subscriber is recognized and ads are skipped.YouTube embeds
socialA 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
productivityA shared office app embedded inside another tool needs it to open the same signed in workspace.Microsoft 365 embeds
gamesA game embedded on a portal site uses it to keep a player signed in to the game publisher's account.None named
shoppingA payment or login iframe asks for its cookies so a saved card stays available.None named
adsAd 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

Good uses and abuse

Legitimate uses

  • Embedded login

Known abuse

  • Cross site tracking when granted

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough 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.

On this page