Skip to content

Use signInWithPopup everywhere, drop signInWithRedirect#68

Merged
quequeo merged 1 commit intomainfrom
feature/use-popup-auth-everywhere
Mar 19, 2026
Merged

Use signInWithPopup everywhere, drop signInWithRedirect#68
quequeo merged 1 commit intomainfrom
feature/use-popup-auth-everywhere

Conversation

@quequeo
Copy link
Owner

@quequeo quequeo commented Mar 19, 2026

Summary

  • Drop signInWithRedirect / getRedirectResult — Firebase v10+ redirect flow fails silently when third-party cookies are blocked (most modern browsers), causing getRedirectResult to return null after the OAuth round-trip
  • Use signInWithPopup for both dev and production environments
  • The SW fix from PR Fix Google Sign-In broken by Service Worker intercepting auth handler #67 (navigateFallbackDenylist) ensures the popup opens the Firebase auth handler correctly
  • Simplify AuthProvider code: remove isDev branching, redirect handling, and unused imports
  • Clean up debug console.logs from previous iteration

Test plan

  • ESLint: 0 errors
  • Prettier: all files pass
  • Vitest: 347/347 tests pass
  • Pre-push hooks pass
  • Production tested: Google Sign-In popup works at app.winbit.com.ar

signInWithRedirect in Firebase v10+ fails silently when third-party
cookies are blocked (most modern browsers). getRedirectResult returns
null after the OAuth round-trip, losing the authenticated user.

Switch to signInWithPopup for both dev and prod — the earlier SW fix
(navigateFallbackDenylist) ensures the popup opens the Firebase auth
handler correctly instead of the SPA.
@quequeo quequeo merged commit c639160 into main Mar 19, 2026
2 checks passed
@quequeo quequeo deleted the feature/use-popup-auth-everywhere branch March 19, 2026 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant