Google One Tap
Google's One Tap widget rendered directly on this app's own page via FedCM. The browser never redirects away from this page to get a Google credential — instead, the resulting Google ID token is exchanged for Auth0 tokens via RFC 8693 Custom Token Exchange, the same mechanism this suite's /demo/firebase-auth-cte page uses for Firebase. (Auth0 also has a built-in, Action-free exchange for Google — the mechanism native mobile apps use — but it's restricted to native-app clients, confirmed via a live test against this Regular Web App; see below for the full mobile-vs-web story.)
No redirect yet
This page
Renders Google's widget
Google (FedCM)
Issues ID token in-browser
Auth0 /oauth/token
RFC 8693 token exchange
Compare with Firebase Auth → Auth0, which proves the same RFC 8693 mechanism against a different real external IdP. Auth0's built-in native-social token exchange for Google needs no Action at all — but it's restricted to app_type: native clients; a confirmed 403 unauthorized_client from a live test against this Regular Web App is why this demo uses a Custom Token Exchange Action instead, as any web client must.
This renders Google's own One Tap widget directly on this page — no redirect to Auth0 or Google happens until you tap it. If you have an active Google browser session, the prompt appears via FedCM. The resulting credential is a real, Google-issued RS256 ID token; it only reaches Auth0 at the exchange step below.
Auth0 has a built-in, Action-free token exchange for Google specifically — a reserved subject_token_type (http://auth0.com/oauth/token-type/google-id-token) that, on the right client type, trades a Google ID token for Auth0 tokens with no Custom Token Exchange profile and no validator code at all. That path exists and works — it's how a native mobile app integrates One Tap: the OS-level Google Sign-In SDK hands the app a Google ID token, the app calls Auth0's /oauth/token directly with that reserved type, and Auth0 itself verifies it against Google — no Action to write, deploy, or maintain.
Web is different. That same reserved exchange is gated to app_type: native clients — confirmed with a live test against this Regular Web App's real tenant, returning 403 unauthorized_clientnaming the exact grant/subject-type combination as not enabled for this client, independent of any dashboard toggle. A browser-based app has no OS-level Google SDK and no way to satisfy that gate, so this demo's only option is Custom Token Exchange with its own Action doing the verification Auth0 would otherwise do for you — the one-time cost of building on web rather than native.
Auth0's hosted Universal Login has its own native FedCM One Tap support, enabled per client with a single toggle (fedcm_login.google.is_enabled) and zero app-side token handling — no widget, no Action, no exchange call on this app's side at all. In principle it's the same UX as above with a completely different trust boundary: the credential never leaves Auth0's own domain.
It couldn't be demoed side-by-side here, though. Auth0 supports only one Google social connection per tenant. This tenant's existing google-oauth2 connection is already load-bearing for the Token Vault demos (Connected Accounts), and Auth0's own documentation states plainly that One Tap and Connected Accounts/Token Vault cannot both be active on the same connection — confirmed directly: enabling the toggle on a second client left Universal Login's hosted login page serving no One Tap config at all (checked by fetching the rendered page and finding no one-tap-config-jsonscript element). A genuinely separate Google connection with its own credentials would sidestep this — one Google OAuth client per tenant is not itself a hard requirement — but that is a different build than reusing the tenant's shared connection, and wasn't pursued here to avoid touching a connection the Token Vault demos depend on.
Strengths
- No redirect away from the app to get a Google credential — the One Tap prompt renders in-page via FedCM, then the resulting token is exchanged entirely over a server-to-server /oauth/token call. The lower-friction UX doesn't come at the cost of a looser trust model: a dedicated Action verifies the token against Google's live JWKS, same discipline as /demo/firebase-auth-cte.
- Every verification check (signature, algorithm, issuer, audience, email_verified) is explicit in this repo's own Action code and auditable directly — unlike Auth0's built-in native-social token exchange for Google, which validates internally with no visibility into exactly what it checks. That built-in path was tried first for this demo and ruled out: confirmed via a live test that it's restricted to app_type: native clients, returning 403 unauthorized_client for this Regular Web App — a platform-enforced gate, not a missing config toggle.
- Identity is mapped by Google sub, never by email — email is display-only once the sub-based mapping has already succeeded.
Risks & Considerations
- This Action provisions/looks up an Auth0 identity by Google sub only. If a visitor already has an Auth0 account under the same email (e.g. password-based signup), that is a genuinely separate, unlinked identity — not merged with this one. This is a deliberate, documented scope decision, not a bug: Auth0's own Account Linking guidance explicitly warns against auto-linking by email alone, since an attacker who merely controls a Google account with a matching address could otherwise take over an existing password-based account. Real account linking, built properly, now exists as its own pair of demos at /demo/account-linking — see that page's Security Implications panel.
- Fixed 2026-11-06: the Action originally provisioned its synthetic identity on Username-Password-Authentication (via setUserByConnection with a google-one-tap|<sub> user_id), not on the real google-oauth2 connection. That silently claimed the signer's email on the database connection with no password ever set, which then blocked a genuine, independent password signup with that same email — Auth0 enforces unique emails per connection, and the synthetic identity had already "occupied" it there. This was discovered live, not found by inspection: a real signup attempt failed, and the 2nd user record this Action had created turned out to be the cause. Now provisions on google-oauth2 using Google's own sub as user_id, converging onto the same identity a native Google login would create for that account and leaving the database connection free for real signups — verified via tenant logs (secte event, connection: google-oauth2) and confirmed the existing Token Vault tokens on that identity were untouched.
- The nonce generated for the One Tap prompt is not currently verified against the exchanged token's own nonce claim server-side, so replay protection here is weaker than a full implementation would want.
- Like the Firebase CTE demo, this has a genuine runtime dependency on Google's JWKS endpoint being reachable — a cold cache miss during an outage would fail every exchange.
- Universal Login also has a native FedCM One Tap mode (fedcm_login.google.is_enabled, zero app-side code) that would move the credential handling off this app entirely — not demoed here because it requires a dedicated Google social connection, and a tenant only supports one. This tenant's existing connection is load-bearing for the Token Vault demos, and Auth0's own docs state One Tap and Connected Accounts/Token Vault cannot both be active on the same connection — confirmed directly: enabling the toggle on a second client left Universal Login serving no One Tap config at all (no one-tap-config-json element on the rendered login page).
Hardening Checklist
- Verify the nonce round-trips: generate it per-prompt, pass it to Google, and check the exchanged ID token's nonce claim matches before accepting the exchange — not yet wired end-to-end here.
- For a production integration where linking genuinely matters, build it as its own explicit, user-confirmed flow (Auth0 Account Linking, re-authenticating into both accounts) rather than folding an email match into this Action.
- algorithms: ['RS256'] is pinned explicitly in verification, closing the classic alg-downgrade attack where a token's header is swapped to claim HS256 — same as the other external-IdP CTE demos in this suite.
- If Universal Login's native One Tap is the real goal, provision a second, dedicated Google OAuth client and Auth0 connection rather than reusing a connection anything else depends on — don't assume the per-client fedcm_login toggle is independent of the connection's other settings.