Skip to content

fix: process Firebase redirect result after Google login - #11

Open
tangentstorm wants to merge 1 commit into
mainfrom
fix/login-redirect-result-10
Open

tangentstorm wants to merge 1 commit into
mainfrom
fix/login-redirect-result-10

Conversation

@tangentstorm

Copy link
Copy Markdown
Collaborator

Summary

  • Call getRedirectResult(auth) on login page load (via new processRedirectResult()) before checking currentUser() / showing buttons
  • Remove unreachable getRedirectResult + success/fail handling after signInWithRedirect in attemptLogin() (that code never ran because redirect navigates away)

Fixes #10

Test plan

  • On a fresh browser (no existing Firebase session): tanco login → Login with Google → complete Google UI → page should POST to /auth/success and CLI should receive JWT (not loop back to buttons)
  • Direct /login (no ?pre=) after Google redirect should still complete and land on login success path
  • Already-signed-in visit still auto-submits via currentUser() without clicking buttons
  • No automated browser E2E in-repo; this needs a real Google OAuth round-trip against staging or local Firebase config

signInWithRedirect navigates away, so getRedirectResult after it never
ran. On return the page only checked currentUser(), leaving the redirect
credential unconsumed and re-showing the login buttons (Fixes #10).
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.

tanco login: infinite login loop — redirect result never read after Google sign-in (0.4.0)

1 participant