Skip to content

fix(web): fall back to redirect sign-in when the popup is blocked - #4118

Merged
amitsingh-007 merged 1 commit into
mainfrom
bug-web-signin-popup-blocked
Aug 1, 2026
Merged

fix(web): fall back to redirect sign-in when the popup is blocked#4118
amitsingh-007 merged 1 commit into
mainfrom
bug-web-signin-popup-blocked

Conversation

@amitsingh-007

@amitsingh-007 amitsingh-007 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Check if the Pull Request fulfils these requirements

  • Does the extension require a version change?

Greptile Summary

The PR changes Google authentication to try popup sign-in first and fall back to redirect sign-in when Firebase reports that the popup was blocked.

  • Removes mobile OS detection and the now-unused Mantine hooks dependency.
  • Retains redirect-result processing on /web-ext.
  • Adds a local Claude settings file to .gitignore.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code defect identified.

The popup-blocked path now transitions to the existing redirect flow, redirect results remain processed after reload, and the removed OS-detection dependency is no longer referenced.

Reviews (1): Last reviewed commit: "fix(web): fall back to redirect sign-in ..." | Re-trigger Greptile

Context used:

signInWithPopup awaits gapi + the /__/auth iframe ping before calling
window.open; on prod the proxied authDomain makes that slow enough to
outlive Chrome's 5s user-activation budget, so window.open returns null
and sign-in fails with auth/popup-blocked.

Use the standard pattern instead: try popup first everywhere, and on
auth/popup-blocked fall back to signInWithRedirect, which needs no popup
permission and works via the same-origin /__/auth proxy. This one path
also covers iOS Safari (blocks popups by default), so drop the
useOs/isMobile sniffing and apps/web's @mantine/hooks dependency.

Also gitignore .claude/settings.json (local plugin config).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In googleSignIn, you only fall back to redirect for auth/popup-blocked; consider whether other popup-related Firebase errors (e.g. environment-specific codes) should trigger the same fallback instead of being rethrown to improve robustness across browsers.
  • Since googleSignIn no longer takes an isMobile flag, double-check any other callers or platform-specific assumptions to ensure there are no remaining code paths that expect mobile-only redirect behaviour.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `googleSignIn`, you only fall back to redirect for `auth/popup-blocked`; consider whether other popup-related Firebase errors (e.g. environment-specific codes) should trigger the same fallback instead of being rethrown to improve robustness across browsers.
- Since `googleSignIn` no longer takes an `isMobile` flag, double-check any other callers or platform-specific assumptions to ensure there are no remaining code paths that expect mobile-only redirect behaviour.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@amitsingh-007
amitsingh-007 merged commit 671a984 into main Aug 1, 2026
4 checks passed
@amitsingh-007
amitsingh-007 deleted the bug-web-signin-popup-blocked branch August 1, 2026 18:00
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