Skip to content

fix: harden Firebase auth error handling and fix silent regression in RegisterPage#16

Merged
AlexLopezGomez merged 6 commits into
mainfrom
dev
Mar 22, 2026
Merged

fix: harden Firebase auth error handling and fix silent regression in RegisterPage#16
AlexLopezGomez merged 6 commits into
mainfrom
dev

Conversation

@AlexLopezGomez
Copy link
Copy Markdown
Owner

Summary

  • Fixed silent failure where social auth errors on RegisterPage Step 1 were invisible to the user (error was rendered only on Step 3; navigating away cleared it). Caught by Codex adversarial review during CEO+Eng review session.
  • SocialAuth now owns its own error display via local state, calls clearError() after catching to prevent parent forms (SignInForm, SignUpFlow) from double-displaying the same error message.
  • Updated auth/popup-closed-by-user message to mention missing env vars and Firebase Authorized Domains as the most common cause on fresh deployments (matching CLAUDE.md runbook).
  • Error color in SocialAuth unified to text-verdict-fail design system token (was text-red-500).
  • firebaseConfigured export added to firebase.js — UI renders "Social sign-in is not configured." when Firebase env vars are absent.
  • Named error handling for auth/account-exists-with-different-credential, auth/popup-blocked, auth/popup-closed-by-user, auth/unauthorized-domain.
  • Meta tag fallback for Firebase config enables Docker runtime injection as alternative to build-time env vars.
  • CLAUDE.md: Docker base image rules, npm install vs npm ci, Firebase auth deployment checklist and error code reference.
  • TODOS.md: created with P2 items for Firebase health endpoint and Vitest auth unit tests.

Test Coverage

Test generation skipped — no test framework configured. Vitest setup tracked in TODOS.md (P2).

Test plan written to ~/.gstack/projects/Quorum/ for /qa and /qa-only consumption.

Critical paths to verify manually:

  • Google OAuth: click → popup → auth → redirect to /app
  • GitHub OAuth: same
  • Social auth failure on RegisterPage Step 1: error must appear on Step 1, not hidden until Step 3
  • Social auth failure in SignInForm: error shown once (inside SocialAuth), not twice
  • Firebase env vars absent: "Social sign-in is not configured." shown, no buttons

Pre-Landing Review

1 issue found, 1 auto-fixed:

  • [AUTO-FIXED] SocialAuth.jsx:50text-red-500text-verdict-fail (design system consistency)

Design Review

Design Review (lite): 1 finding — 1 auto-fixed, 0 skipped. Color token consistency: clean.

Eval Results

No prompt-related files changed — evals skipped.

Greptile Review

No Greptile comments.

TODOS

  • TODOS.md created with 2 new P2 items:
    • Firebase auth health endpoint (GET /api/auth/firebase-health)
    • Vitest + React Testing Library auth unit tests

Test plan

  • Google sign-in on /login
  • GitHub sign-in on /login
  • Social auth failure on /register Step 1 shows error in Step 1
  • Social auth failure in sign-in form shows error once (not twice)
  • Deploy without VITE_FIREBASE_* env vars shows "not configured" message

🤖 Generated with Claude Code

AlexLopezGomez and others added 6 commits March 21, 2026 17:18
- SocialAuth restores local error state; calls clearError() to prevent
  parent forms from double-displaying the same error
- Fixed silent failure in RegisterPage Step 1 where social auth errors
  were only rendered on Step 3 (caught by Codex adversarial review)
- Updated auth/popup-closed-by-user message to mention env vars and
  Firebase Authorized Domains as the most common cause on new deploys
- Error color unified to text-verdict-fail (was text-red-500)
- CLAUDE.md: Docker base image rules (Alpine vs node:XX-alpine),
  npm install vs npm ci rules, Firebase auth deployment checklist,
  error code reference (popup-closed, unauthorized-domain, etc.)
- TODOS.md: created with P2 items for Firebase health endpoint
  and Vitest auth unit test setup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AlexLopezGomez AlexLopezGomez merged commit 9061b88 into main Mar 22, 2026
1 of 5 checks passed
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