Skip to content

server: CSP frame-src allows simlin.firebaseapp.com, likely unused #383

Open

Description

@bpowers

The Content-Security-Policy frame-src allows https://simlin.firebaseapp.com and https://auth.simlin.com.
The Firebase authDomain is auth.simlin.com, and the redirect sign-in fallback loads an iframe from it, so that entry must stay.
simlin.firebaseapp.com looks unused, but whether Firebase ever frames it is unverified.

Fix

Remove https://simlin.firebaseapp.com from frame-src, deploy a canary, and check Google and Apple sign-in, including the popup-blocked redirect fallback.
If anything breaks, put it back and close this.

The policy is set in two places that must stay in sync: the Express CSP and the static-file headers in app.yaml.

Pointers

  • src/server/app.ts ('frame-src' directive)
  • app.yaml (two Content-Security-Policy headers)
  • src/app/App.tsx (authDomain), src/app/Login.tsx (popup with redirect fallback)

Activity

  1. added
    backend
    on Jun 8, 2026
  2. bpowers commented on Jun 9, 2026

    @bpowers
    OwnerAuthor

    Correction for main. The frame-src entries (https://simlin.firebaseapp.com, https://auth.simlin.com) are present at src/server/app.ts:158, but they must not be removed on main: the client uses Firebase signInWithRedirect against authDomain: auth.simlin.com, and Firebase's auth iframe is served from that domain -- removing these would break OAuth.

    The "client no longer uses Firebase's redirect-based flow" rationale only holds after the server-side-auth migration (commit fec5fc61), which was never merged. Keeping open as a cleanup that is blocked on that migration actually landing.

  3. changed the title [-]Clean up CSP frame-src directive after server-side auth migration[/-] [+]server: CSP frame-src allows simlin.firebaseapp.com, likely unused[/+] on Oct 12, 2026
  4. added
    hygiene
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendhygiene

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions