How does FedCM work and how do I use it?
Short answer
FedCM (Federated Credential Management) is a browser API for signing in with an identity provider without third-party cookies or redirects. Your page calls navigator.credentials.get with the provider’s config URL; the browser fetches the accounts itself, shows a “Continue as” prompt, and returns a token only after the person continues. Chrome and Edge support it, and loginos is one such provider.
FedCM (Federated Credential Management) is the browser API behind the “Continue as Jane” prompts that appear on some sites, including Google One Tap in Chrome. Your site asks the browser for a sign-in with an identity provider. The browser talks to the provider, draws the prompt and hands your page a token.
Until the person continues, your site learns nothing about them, and the provider can’t tell which of its users is on your site. FedCM is a draft standard of the W3C Federated Identity Working Group, and Chrome has shipped it since version 108, in 2022.
Why does FedCM exist?
FedCM exists because federated sign-in used to rely on the same tools that trackers use. Sign-in buttons and one-tap prompts ran in iframes from the provider’s domain, which read the provider’s cookies as third-party cookies. Third-party cookies let embedded content follow people across sites, so browsers restrict them:
- Safari blocks third-party cookies by default.
- Firefox gives each site its own cookie jar (Total Cookie Protection).
- Chrome blocks them in Incognito and for people who turn them off. Google planned to remove them for everyone, then decided in 2024 and 2025 to leave the choice to users. In October 2025, Google said it keeps supporting FedCM.
FedCM replaces the iframe with the browser itself. The browser fetches the provider’s endpoints and draws its own prompt. No request carries both the provider’s cookies and your site’s origin until the person has agreed. Sign-in keeps working where third-party cookies don’t, and the browser can tell a real sign-in from tracking.
Who does what in FedCM?
FedCM has three parties:
- The relying party (RP) is your site. It has a client ID from the provider and calls the API.
- The identity provider (IdP) holds the accounts, like Google or loginos. It serves a few JSON endpoints that only the browser calls.
- The browser fetches those endpoints, draws the prompt and enforces the privacy rules.
A sign-in runs in six steps:
- Your page calls
navigator.credentials.get()with the IdP’s config URL and your client ID. - The browser checks the IdP’s login status. If the IdP said nobody is signed in, a page-load call stops here without any request.
- The browser fetches the IdP’s well-known file and config file without cookies. Then it fetches the accounts endpoint with the IdP’s cookies, but without saying which site is asking.
- The browser shows the prompt over your page. Your page sees nothing.
- When the person continues, the browser posts to the IdP’s ID assertion endpoint, now with your origin and client ID, and gets a token back.
- Your page receives an
IdentityCredential. It sendscredential.tokento your server, which validates it.
What does the identity provider serve?
A FedCM identity provider serves a set of endpoints, and the browser treats each one differently:
| Endpoint | Returns | Sends the IdP’s cookies | Tells the IdP the site |
|---|---|---|---|
/.well-known/web-identity | Where the config file is | No | No |
| Config file | The other endpoints, a login_url and branding | No | No |
| Accounts endpoint | The accounts signed in to the IdP | Yes | No |
| Client metadata endpoint | Your privacy policy and terms links | No | Yes |
| ID assertion endpoint | A token for your site | Yes | Yes |
| Disconnect endpoint | The account that was disconnected | Yes | Yes |
The well-known file sits at the root of the IdP’s registrable domain, while the config file can live anywhere. The two-step lookup stops an IdP from putting your site’s name in the config URL to track people. The file lists the config file in provider_urls. An IdP with a client metadata endpoint must also name its accounts_endpoint and login_url there:
{
"provider_urls": ["https://accounts.idp.example/fedcm/config.json"],
"accounts_endpoint": "https://accounts.idp.example/fedcm/accounts",
"login_url": "https://accounts.idp.example/login"
}Every FedCM request carries Sec-Fetch-Dest: webidentity. Pages can’t set headers that start with Sec-, so the header shows that the browser’s FedCM code sent the request, not a script on another site. Check it on the accounts, ID assertion and disconnect endpoints, and refuse requests without it.
The ID assertion endpoint is where the IdP decides. It gets a form post with the page’s origin:
POST /fedcm/assertion HTTP/1.1
Host: accounts.idp.example
Origin: https://rp.example
Cookie: idp_session=…
Content-Type: application/x-www-form-urlencoded
Sec-Fetch-Dest: webidentity
client_id=your-client-id&account_id=1234&is_auto_selected=false¶ms=%7B%22nonce%22%3A%228f2c1a%22%7DThe IdP must check that the Origin belongs to that client ID, because the browser can’t: client IDs mean nothing to it. It answers with JSON like {"token": "…"} and the CORS headers Access-Control-Allow-Origin: https://rp.example and Access-Control-Allow-Credentials: true. The token can be anything the IdP likes, such as an ID token or a one-time code. Instead of a token, the IdP can return an error, or a continue_on URL that the browser opens in a popup for extra steps.
The Login Status API tells the browser whether anyone is signed in to the IdP. The IdP sends Set-Login: logged-in or Set-Login: logged-out on its own responses, or calls navigator.login.setStatus() on its pages. While the status is logged-out, the browser skips the accounts request and a page-load call fails quietly. A call from a click opens the IdP’s login_url in a small window instead, and the sign-in page calls IdentityProvider.close() when it is done.
How does a site call FedCM?
A site calls FedCM with one navigator.credentials.get() call. Check for support first, because only some browsers have it:
async function signInWithFedCM(nonce) {
if (!("IdentityCredential" in window)) return null; // use a popup or a redirect instead
return navigator.credentials
.get({
identity: {
context: "signin",
providers: [{
configURL: "https://accounts.idp.example/fedcm/config.json",
clientId: "your-client-id",
params: { nonce }, // random, from your server, checked there again
}],
},
mediation: "optional",
})
.catch(() => null); // closed, or nobody signed in
}These options shape the prompt:
mode:"passive", the default, can run on page load and shows nothing when the person isn’t signed in to the IdP."active"must run from a click, takes exactly one provider, shows a larger dialog and can open the IdP’s sign-in window. Chrome addedmodein version 132; before that it called these the widget and button modes.mediation:"optional", the default, lets the browser sign a returning person in by itself."silent"does that or fails without any UI, and"required"always asks.context:"signin","signup","use"or"continue"changes the prompt’s wording.loginHintanddomainHintshow only the accounts that match.params: whatever the IdP needs, like anonce. The spec movednoncehere, and the old top-levelnonceis deprecated.
Automatic sign-in, called auto-reauthentication, only happens for someone who signed in to your site with FedCM before and has one returning account. The credential then has isAutoSelected set to true, and Chrome does it at most once every 10 minutes. When someone signs out of your site, call navigator.credentials.preventSilentAccess(), so the browser doesn’t sign them straight back in. IdentityCredential.disconnect({ configURL, clientId, accountHint }) removes the connection entirely. In Chrome 136 and later, a passive call can list several providers, and the browser shows all their accounts in one prompt.
Which browsers support FedCM?
As of October 2026, FedCM works in Chromium-based browsers only:
| Browser | FedCM |
|---|---|
| Chrome | Yes, since version 108 (2022), on desktop and Android |
| Edge, Opera, Samsung Internet | Yes, as Chromium-based browsers |
| Firefox | No. Its implementation sits behind a preference that is off by default. Firefox 138 added the Login Status API on its own. |
| Safari | No, on macOS or iOS |
Newer parts arrived later in Chrome: the Login Status API in version 120, disconnect() in 122, mode and params in 132, and several providers in one call in 136. Treat FedCM as an addition: keep a popup or redirect sign-in for browsers without it. MDN’s FedCM page tracks support in detail.
How loginos does it
loginos is a FedCM identity provider. It serves the provider side for you: the well-known file, a config file at https://loginos.io/fedcm/config.json, the accounts, client metadata, ID assertion and disconnect endpoints, and the login status. Its ID assertion endpoint only answers pages on your platform’s domains, and the token it returns is a one-time code. Your server exchanges that code at /oauth/token like a code from the redirect flow, without redirect_uri.
You don’t call FedCM yourself. The browser SDK makes the calls and adds a fallback for other browsers:
| SDK call | In Chrome and Edge | In other browsers |
|---|---|---|
prompt() | get() in passive mode with mediation: "optional" | Resolves null |
prompt({ auto: false }) | The same, with mediation: "required" | Resolves null |
signIn() | get() in active mode with mediation: "required" | Opens a small loginos window |
signOut() calls preventSilentAccess(), and disconnect() calls IdentityCredential.disconnect(). The SDK sends the nonce both in params and at the top level, so older Chrome versions work too.
<script src="https://loginos.io/sdk/v1.js"></script>
<script>
const loginos = Loginos.init({ appKey: "YOUR_APP_KEY" });
const finish = (result) =>
result &&
fetch("/api/auth/login/single/token", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(result), // { code, nonce, via }
});
loginos.prompt().then(finish);
document.querySelector("#sign-in").onclick = () => loginos.signIn().then(finish);
</script>Sign in to your-app.example with loginos.io
Jane Doe
jane@example.com
The Continue as docs have the server route that checks the ID token’s nonce, and How do I add a one-tap “Continue as” login? covers testing and the headers that break the window. loginos offers loginos accounts only. If people should sign in with their Google or Microsoft accounts, you need those providers, and if you want to be the identity provider yourself, the endpoints above are what you build.
Frequently asked questions
Does FedCM replace OAuth and OpenID Connect?
No. FedCM replaces the browser part of a sign-in: the redirect or the iframe becomes a prompt the browser draws. What the token is, and how your server checks it, is still up to the identity provider. Google One Tap returns an ID token, for example, while loginos returns a code that your server exchanges with standard OpenID Connect.
Does FedCM need third-party cookies?
No. The browser sends the identity provider’s cookies only to the provider’s own FedCM endpoints, so FedCM works when third-party cookies are blocked. The provider’s session cookie must be SameSite=None, because these requests start from another site.
Is FedCM only for Google accounts?
No. Google One Tap uses it in Chrome, but any identity provider can serve the endpoints. Seznam, a Czech internet company, offers its accounts through FedCM, and loginos does too. A site can only use a provider that has given it a client ID.
Can I use FedCM inside an iframe?
Yes, if the parent page allows it. FedCM is a policy-controlled feature named identity-credentials-get, and by default only same-origin frames may use it. Add allow="identity-credentials-get" to a cross-origin iframe that needs it.
One account for every domain you run
loginos is an OpenID Connect provider with passkeys, a user pool shared by all of your domains, roles in every token, and account linking for the users you already have. Add your platform and its domains in a few minutes.
Keep reading
- One-tap sign-inHow do I add a one-tap “Continue as” login to my site?Use FedCM, the browser API behind “Continue as” prompts, with an identity provider that supports it: your page asks on load or from a button, Chrome and Edge show the prompt, and your server checks what comes back. Safari and Firefox need a popup instead. The loginos SDK does both and gives your page a one-time code for your server to exchange.7 min read
- One-tap sign-inIs there an alternative to Google One Tap?Yes: FedCM, the browser API that Google One Tap uses in Chrome, works with any identity provider, so other providers can show the same kind of prompt for their own accounts. Passkey autofill gives returning users a one-tap sign-in on your own form. Hosted providers also offer “Continue as” prompts, as loginos does for loginos accounts.7 min read
- Sign-in across domainsHow do I share a login session across multiple domains?You can’t share a session cookie between two different domains, because browsers only send a cookie to the domain that set it. Instead, each domain keeps its own session and gets it from one central login, an OpenID Connect provider. Someone who is already signed in there is sent straight back with a one-time code, without seeing a form.6 min read
- Sign-in across domainsHow do I implement single sign-on across different domains?Use one OpenID Connect provider for all of your domains, and register each domain’s callback URL with it. On every domain, add a route that redirects to the provider with state and PKCE, and a callback that checks state, exchanges the code on your server and starts that domain’s own session. People signed in on one domain then pass through the others without a form.8 min read