feat: per-server OAuth request settings for Google Chat sign-in #52
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/google-chat-user-oauth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Lets each user connect Google Chat with their own Google account, through the existing
per_userupstream OAuth. Google has no dynamic registration, issues no refresh token by default, and does not document RFC 8707, so a remote server gets two new OAuth settings. Fixed scopes already worked; this adds a test that pins them.An extra parameter cannot replace
response_type,client_id,redirect_uri,state,code_challenge,code_challenge_method,scopeorresource, so it cannot weaken state or PKCE. Rejected by the shared contract and flagged in the admin form.Setup for Google Chat is in
docs/deployment.md. The redirect URI isPUBLIC_URL/api/upstream-oauth/callback.Evidence
upstream-oauth.test.ts > authorization request settingsfail (extra parameters not stored,resourcestill sent, reserved names accepted with 200).After: they pass, and so does the whole suite.
npm test: 548 passed, 2 skipped. Typecheck and build pass; lint has one existing warning in a file this PR does not touch.POST /api/admin/servers/:id/oauth/authorizeagainsthttps://chatmcp.googleapis.com/mcp/v1, dummy client id): 200 with both settings. Discovery resolves toaccounts.google.com.Not verified: a real sign-in, code exchange and refresh with a Google account, and therefore whether Google accepts
resource. With a dummy client Google returns the same error with and without it, because it rejects the client first. The docs tell admins to turn the option off for Google, since its OAuth documentation does not list that parameter.Merge Danger
Door: two-way
The migration only adds two columns with defaults, and earlier code ignores them. Migrations are forward only, so a rollback leaves the columns in place, unused.
Blast Radius: narrow
Existing servers keep today's behaviour through the defaults. Saving a change to either setting signs every user out of that server, as any OAuth settings change already does.
🤖 Generated with Claude Code