Mirrors the Apple channel's zero-dep posture (PLAN_WEB_SIGNUP S1):
- src/web/googleAuth.ts — pure RS256/JWKS verifier for Google ID tokens
(dual-issuer, aud = OAuth web client id, clock-tolerant, cached JWKS),
default-OFF config gated on LISA_CLOUD_GOOGLE_SIGNIN + _CLIENT_ID.
- POST /api/auth/google — pre-gate access-minting endpoint sharing the
per-IP auth rate bucket; upserts the account and mints a per-uid session.
- Account merge policy: a Google sign-in whose email Google asserts
verified links onto an existing VERIFIED same-email account (same uid,
same Lisa); unverified squatters never inherit an identity.
- Login page draws the GIS button only when /api/auth/config advertises
it; unreachable networks (e.g. mainland China) silently hide it.
- LOGIN_HTML joins the inline-script syntax regression guard.
- deploy.sh plumbs the two new env vars.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part of PLAN_WEB_SIGNUP_v1.0 — milestone S1.
What
Adds the third sign-in provider to LISA Cloud's login page, mirroring the Apple channel's zero-dependency posture:
src/web/googleAuth.ts— pure RS256/JWKS verifier for Google ID tokens: dual issuer spellings,aud= OAuth web client id, clock tolerance, 1h-cached JWKS, typedGoogleAuthError. Default-OFF: lights up only whenLISA_CLOUD_GOOGLE_SIGNINandLISA_CLOUD_GOOGLE_CLIENT_IDare both set.POST /api/auth/google— pre-gate access-minting endpoint (same posture as/api/auth/apple), sharing the per-IP auth rate bucket; upserts the account, mints the per-uid HMAC session, pins the cookie./api/auth/configadvertisesgoogleWeb; script-load failure (e.g. mainland China) silently hides the button instead of erroring.LOGIN_HTMLadded to the inline-script syntax regression guard (it wasn't covered).deploy/deploy.shplumbs the two new env vars.Replay posture
GIS button-flow tokens are minted per page-load by Google's script with no client-mintable raw nonce, so the ~1h token lifetime is the replay window — the same stance the Apple channel takes for pre-nonce clients. Documented in the module header.
Tests
npm test: 1296 pass / 0 fail. New:googleAuth.test.ts(verifier + config, incl. alg-confusion and tampered-payload cases), 4 merge-policy cases inaccounts.test.ts.Operator steps (not in this PR)
Create the OAuth web client in GCP console (authorized JS origin
https://cloud.meetlisa.ai), then deploy withLISA_CLOUD_GOOGLE_SIGNIN=1 LISA_CLOUD_GOOGLE_CLIENT_ID=….🤖 Generated with Claude Code