docs: add Google Workspace SSO setup guide - #85
Open
geekypunk wants to merge 1 commit into
Open
Conversation
The four SECURITY_GOOGLE_* variables were undocumented — absent from .env.example and unmentioned in the README — and two required steps are not discoverable from configuration alone: - The domain allowlist is a database table (google_workspace_domain), not an environment variable. Without a row, SSO rejects every sign-in while appearing fully configured. - SSO does not provision accounts. A valid Workspace user who was never added to DeepSQL gets "403 This account is not provisioned in DeepSQL", which reads as a bug rather than the deliberate authorization boundary it is. Also documents two traps found while setting this up on a real deployment: - APP_PUBLIC_URL vs APP_BASE_URL. Both default to http://localhost:3000 and they are not interchangeable: app.public-url drives every auth redirect, app.base-url only the CLI device flow. Setting the wrong one leaves sign-in succeeding but landing the user on localhost:3000/dashboard. - The Audience setting is project-wide. Flipping an existing Cloud project from External to Internal cuts off every non-org user of any other app in that project. Adds docs/GOOGLE_SSO_SETUP.md, the variables to .env.example (including SECURITY_PASSWORD_ENABLED), and index entries in README.md and docs/README.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the Google Workspace SSO feature, which shipped without setup docs.
Written while configuring it end-to-end on a real deployment, so it covers the parts that only surface when you actually try it.
Why this is needed
The four
SECURITY_GOOGLE_*variables appear nowhere — not in.env.example, not in the README. Worse, two required steps cannot be discovered from configuration at all:google_workspace_domain), not an environment variable. Until a row exists, SSO rejects every sign-in while looking fully configured. Nothing points you at the table.403 This account is not provisioned in DeepSQL. That is the right behaviour — otherwise anyone in the org could grant themselves access to a tool holding production database credentials — but undocumented it reads as a bug.Two traps documented
APP_PUBLIC_URLvsAPP_BASE_URL. Both default tohttp://localhost:3000and they are not interchangeable:app.public-urldrives every auth redirect and invite emails,app.base-urlonly the CLI device flow. Set the wrong one and sign-in succeeds, writes the session cookie correctly, then lands the user onlocalhost:3000/dashboard— a failure that looks like broken auth but is purely a redirect target.Audience is project-wide. Flipping an existing Cloud project from External to Internal cuts off every non-org user of any other app in that project. The guide says to check Overview → Metrics for live OAuth traffic first, and to prefer a separate project when in doubt.
Contents
docs/GOOGLE_SSO_SETUP.mdcovers: creating the client in Google Cloud Console (including the current Google Auth Platform layout, where the old single consent-screen page is now split across Audience / Branding / Clients / Data Access), why Internal is worth taking, sharing one project across multiple apps, the four variables,APP_PUBLIC_URL, the allowlistINSERT, restart and verification, provisioning,SECURITY_PASSWORD_ENABLED, and a troubleshooting table keyed by the exact error strings the app returns.Also adds the variables to
.env.examplewith the two non-obvious caveats inline, and index entries inREADME.mdanddocs/README.md.Note
There is no
gcloudpath for creating the OAuth client —gcloud iap oauth-clientswas the nearest equivalent and was shut down in March 2026, and it never supported custom redirect URIs. The guide states this so nobody spends time looking for one.Docs only — no code changes.