Firebase · sdk · fg-0189

Firebase signInWithRedirect returns to the app with no user on Chrome, Safari, or Firefox

getRedirectResult() resolves to null after a successful Google sign-in

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

The redirect flow keeps state on the authDomain helper page, and browsers now partition third-party storage, so when authDomain differs from the app's domain the state is lost. Chrome 115 and later enforced this from June 24, 2024, after Safari 16.1 and Firefox 109.

Fix

Serve the auth helper from your own domain: set authDomain to the app's domain on Firebase Hosting, or reverse proxy /__/auth/ to PROJECT_ID.firebaseapp.com, and add the new redirect URI at the OAuth provider. Otherwise switch to signInWithPopup.

Apply

initializeApp({
  apiKey: '...',
  authDomain: 'app.example.com', // same domain that serves the app, proxying /__/auth/*
  projectId: '...',
});
// OAuth provider redirect URI: https://app.example.com/__/auth/handler

Affects: Firebase JS SDK redirect sign-in on Chrome 115+ (from 2024-06-24), Safari 16.1+, Firefox 109+, when authDomain is not the app's own domain

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp