← Back to Pull requests

fix: return Firebase email-link sign-in directly to extension via chromiumapp.org (#383) #384

Closed
unknown closed this pull request without merging on Nov 30, 2026 00:55 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 00:31 UTC
Author

Summary

  • Set continueUrl to https://<extension-id>.chromiumapp.org/index.html in Chrome extension context (src/stores/signInFlow.js, src/stores/firebaseStore.js) because Chrome blocks web-origin redirects from Firebase's /__/auth/action to chrome-extension:// URLs (about:blank#blocked).

  • Intercept the return navigation to https://<chrome.runtime.id>.chromiumapp.org/index.html (or /) in public/background.js via chrome.tabs.onUpdated / chrome.tabs.onCreated under the existing https:/// host permission (no new manifest permissions, no web_accessible_resources, and no hosted intermediary) and hand the tab directly to chrome.runtime.getURL("index.html") with the Firebase sign-in query parameters intact.

  • Strictly validate https: scheme, exact <extension-id>.chromiumapp.org host (default port), /index.html or / path, and Firebase email sign-in parameters (mode=signIn, oobCode, apiKey, or wrapped ?link=), while deduplicating repeated tab events per tab until navigation away, tab removal, or failure.

  • Keep everything dynamic for Chrome Web Store distribution (chrome.runtime.id at runtime, user-supplied Firebase config in chrome.storage.local, nothing hardcoded).

  • Update README.md, src/stores/FIREBASE_SETUP.md, DESIGN.md, and add .changeset/extension-chromiumapp-signin.md.
  • Verification

  • npm run ci: passed (check:version-policy, licenses:notices:check, format:check, lint, vitest run — 112 test files / 1509 tests passed, build:chrome + check-chunk-laziness.mjs OK, build:storybook).

  • Claude Sonnet pre-push security review (claude -p --model sonnet): PASS (no blocking issues).

  • Verified live in Chrome against a real Firebase project (passwordless email-link callback returned directly to the extension and synced bookmarks to Cloud Firestore).
  • Closes #383
    Refs #369, #360

    <!-- agent-bot-write: ghw_0c677eae7bb4195e session=210bdd5e08f0 bot=trueline-antigravity-agent[bot] conversation_id=f0de2062-9309-433d-9e89-fd6c9c758e7b conversation_id_source=self-reported -->

    Diff: 260 lines (+195 / -65) across 3 files Reviewer: qwts Review duration: 24m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 260 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.333
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #384"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.0% · Safe to merge
    17.0%