Short answer
On Firebase Hosting with a custom domain or a web.app subdomain, set authDomain to that domain. On other hosts, proxy /__/auth/ to your firebaseapp.com domain, or switch to signInWithPopup. Add your domain to Authorized domains and https://your-domain/__/auth/handler to the provider’s redirect URIs, then redeploy.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why the redirect sign-in fails, and the fix
01
authDomain still points at firebaseapp.com
“This ensures that your app and the auth iframe use the same domain, which prevents the sign-in issue.” Firebase, Redirect best practices (Option 1)
With the app on its own domain and authDomain on firebaseapp.com, the browser keeps them apart. On Firebase Hosting, set authDomain to your custom domain and add https://your-domain/__/auth/handler to the provider’s redirect URIs.
const firebaseConfig = { // ... authDomain: 'app.example.com', };02
The app isn’t on Firebase Hosting
“The signInWithRedirect flow starts by redirecting from your app domain to the domain specified in the authDomain parameter in firebase config” Firebase, Redirect best practices (Option 3)
On Vercel, Netlify or your own server, proxy /__/auth/ to your firebaseapp.com domain as a transparent rewrite, not a 302 redirect. Then set authDomain to your domain and add the redirect URI and authorized domain as above. On Netlify the rule is /__/auth/* https://PROJECT_ID.firebaseapp.com/__/auth/:splat 200.
// vercel.json { "rewrites": [ { "source": "/__/auth/:path*", "destination": "https://PROJECT_ID.firebaseapp.com/__/auth/:path*" } ] }03
A popup would do
“Use signInWithPopup() instead of signInWithRedirect().” Firebase, Redirect best practices (Option 2)
Popups avoid the redirect storage problem. Call signInWithPopup from the click handler and get the user from its result. Popups are sometimes blocked, and the flow is less smooth on phones.
04
Self-hosting the helper files
Copying the sign-in helper files to your domain also works, but Firebase says it doesn’t support Apple sign-in or SAML. Use it only when a proxy isn’t possible.
Checked against the vendor’s docs on : Firebase docs: Best practices for using signInWithRedirect.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firebase Google sign-in popup blocked · Firebase auth/unauthorized-domain · Google OAuth redirect_uri_mismatch · Firebase auth/billing-not-enabled