Skip to content

Commit 6ffee47

Browse files
committed
Studio Web: sign in through studio.tigersystem.io itself (authDomain = the proxying host) — Google's picker names tigersystem.io, first-party sign-in for Safari / iOS / installed apps
1 parent 2d5ccb8 commit 6ffee47

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎WORKLOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Tiger Studio Web hotfixes — ship web-only fixes without a desktop build: `npm run web:hotfix` tags the commit `web-vX.Y.Z.N` (X.Y.Z = the latest release, checked against package.json); `web-sync.yml` also runs on those tags (refuses a non-latest base, deploys the Hub, waits for `{version, webBuild}`); the build stamps the web build number (`--web-build`, shown as "X.Y.Z · web N", part of the reload check); the Hub builds the highest hotfix of the latest release — `scripts/web-hotfix.mjs`, `scripts/build-web.mjs`, `renderer/web-bridge.js`, `.github/workflows/web-sync.yml`, `package.json`, `docs/WEB_HOTFIX.md`
55

66
## Changed
7+
- Studio Web signs in through its own domain: on `studio.tigersystem.io` Firebase Auth's `authDomain` is the page's host (the Hub proxies `/__/auth/*`; Google OAuth client gained the origin + `/__/auth/handler` redirect), so Google's account picker names tigersystem.io instead of `tigertag-connect.firebaseapp.com`, and sign-in stays first-party for Safari / iOS / installed apps; desktop and other hosts unchanged (shipped to the web as web-v2.40.0.2) — `renderer/firebase.js`
78
- Studio Web served at the root of `studio.tigersystem.io` (no redirect); `tigersystem.io/studio` redirects there; separate sign-in from the Hub — `docs/WEB_DEPLOYMENT.md`, `docs/STUDIO-WEB-PLAN.md`, `README.md`, `FEATURES.md`, `llms.txt`, `scripts/build-web.mjs` (comments)
89

910
## Fixed

‎renderer/firebase.js‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22
// Must be loaded AFTER firebase-app-compat.js, firebase-auth-compat.js,
33
// and firebase-firestore-compat.js (see inventory.html script tags).
44

5+
// Hosts that proxy Firebase Auth's /__/auth/* handler (TigerTag_Hub →
6+
// next.config.mjs). Studio Web signs in through its OWN domain there: Google's
7+
// account picker names it instead of tigertag-connect.firebaseapp.com, and the
8+
// sign-in stays first-party, which Safari / iOS / installed apps require. The
9+
// desktop app and any other host keep the default handler domain.
10+
const AUTH_PROXY_HOSTS = ["studio.tigersystem.io"];
11+
const AUTH_DOMAIN = window.electronAPI?.isWeb && AUTH_PROXY_HOSTS.includes(location.hostname)
12+
? location.hostname
13+
: "tigertag-connect.firebaseapp.com";
14+
515
const FIREBASE_CONFIG = {
616
apiKey: "AIzaSyCkxPTs_Cv0KVLqsZj-UKWWqIY0OtfVpnw",
7-
authDomain: "tigertag-connect.firebaseapp.com",
17+
authDomain: AUTH_DOMAIN,
818
projectId: "tigertag-connect",
919
storageBucket: "tigertag-connect.firebasestorage.app",
1020
messagingSenderId: "298062874545",

0 commit comments

Comments
 (0)