Documentation Index
Fetch the complete documentation index at: https://docs.mgpass.net/llms.txt
Use this file to discover all available pages before exploring further.
Overview
mgPass uses FedCM (Federated Credential Management) for cross-domain SSO. FedCM is a W3C standard browser API where the browser itself mediates the identity check — no iframes, no third-party cookies, no custom UI. When a user has an active mgPass session, the browser shows a native account picker prompt. The user clicks “Continue” and receives a signed JWT token — zero friction, zero redirect chains.Browser-native
The browser mediates the entire identity flow. No custom UI, no iframes, no popups.
Zero friction
Users click once on the native browser prompt to authenticate. No login form, no password entry.
No third-party cookies
FedCM works without third-party cookies. Future-proof against browser privacy changes.
Invisible when inactive
If the user has no mgPass session, nothing is shown. Your page is unaffected.
What is FedCM
FedCM (Federated Credential Management) is a W3C standard browser API for identity federation. Instead of relying on iframes, redirects, or third-party cookies, the browser itself acts as the intermediary between the identity provider and the relying party. Key properties:- The browser calls the identity provider’s endpoints directly with first-party cookies
- The user sees a native browser prompt (not a custom UI)
- No third-party cookies are needed — works in all privacy modes
- The identity provider never sees which site the user is visiting until the user consents
Browser Support
| Browser | Support |
|---|---|
| Chrome 108+ | Fully supported |
| Edge 108+ | Fully supported |
| Firefox | Behind flag |
| Safari | In development |
How It Works
Partner site requests credentials
Your site calls
navigator.credentials.get() with the mgPass FedCM configuration, or loads the mgPass SDK which does this automatically.Browser checks for active session
The browser calls
auth.mgpass.net/fedcm/accounts with first-party cookies. This happens in the browser’s internal network stack — no JavaScript is involved.Native prompt shown
If the user has an active mgPass session, the browser displays a native account picker showing the user’s name, email, and avatar. If no session exists, nothing happens.
Token issued
The browser calls
auth.mgpass.net/fedcm/assertion with the selected account and your client ID. mgPass issues a signed JWT token.Quick Start (Using SDK)
The mgPass SDK wraps the FedCM API with automatic fallback for unsupported browsers.Quick Start (Direct API)
You can call the FedCM API directly without the SDK:Token Verification (Backend)
The FedCM flow delivers a signed JWT token to your frontend. Verify it on your backend before creating a session:FedCM Endpoints
These endpoints are called by the browser during the FedCM flow. You do not call them directly — they are listed here for reference.| Endpoint | Purpose |
|---|---|
/.well-known/web-identity | FedCM provider discovery |
/fedcm/config.json | IdP configuration |
/fedcm/accounts | Returns logged-in user accounts |
/fedcm/assertion | Issues JWT token |
/fedcm/client-metadata | RP terms/privacy URLs |
Fallback for Unsupported Browsers
FedCM is not yet supported in all browsers. Use the standard OAuth redirect flow as a fallback:The mgPass SDK (
onetap.js) handles this fallback automatically. If FedCM is not available, the SDK falls back to the OAuth redirect flow.Security
Browser-mediated flow
Browser-mediated flow
The browser itself mediates the entire identity flow. Your site never communicates directly with the identity provider during the credential check — the browser handles all network requests internally.
User consent required
User consent required
The browser always shows a native prompt before sharing any identity information. The identity provider does not learn which site the user is visiting until the user explicitly consents.
No third-party cookies
No third-party cookies
Signed JWT tokens
Signed JWT tokens
The assertion endpoint issues a JWT signed with the mgPass signing key. Verify the signature and claims on your backend using the published JWKS endpoint.
Client ID validation
Client ID validation
The FedCM assertion endpoint validates the
client_id against registered applications. Tokens are audience-bound — a token issued for one client cannot be used by another.Next Steps
- SSO Guide — understand same-domain and cross-domain SSO architecture
- OAuth Flows — full details on the authorization code flow
- Token Refresh — keep users authenticated with automatic token renewal

