Repository navigation
fix: use a google web oauth client for mcp and device sign-in - #928
Merged
Merged
Conversation
The web sign-in redirects to https://api.alera.build/oauth/callback, which the Google desktop client cannot accept, so Google answered redirect_uri_mismatch. Production now sets the new Alera Web client id; its secret is in alera-web-google-oauth-client-secret. GitHub keeps the desktop OAuth App, which now lists the web callback as a second redirect URI.
Contributor
There was a problem hiding this comment.
Important
Production deploy will mount a Google secret the preflight does not check.
Reviewed changes
Reviewed the production OAuth client change for MCP and device sign-in.
- Web Google client: Sets
web_google_oauth_client_id, which injectsALERA_WEB_GOOGLE_CLIENT_IDand mountsalera-web-google-oauth-client-secreton the Cloud Run revision. - GitHub reuse: Leaves the web GitHub client unset so the browser leg keeps the desktop OAuth App credentials and the API callback.
- Docs:
docs/remote-mcp.mdandinfra/production/readme.mddescribe that split.
grok-4.7 | 𝕏
A web client id mounts its secret on the Cloud Run revision, so the preflight now checks that secret has an enabled version before the image build, and the setup and operations docs list it. The setup guide also records the API callback as the GitHub OAuth App's second redirect URI.
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the production preflight and operator docs added since the prior review.
- Web secret gate: Required an enabled
alera-web-{provider}-oauth-client-secretin Production Preflight whenproduction.auto.tfvarssets that provider's web client id, so a missing Google secret fails before the image build and an unset GitHub web client does not. - Operator docs: Recorded the Google web client, the API callback on the desktop GitHub OAuth App, and which web secrets need a version before apply.
grok-4.7 | 𝕏
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.

Summary
MCP and device sign-in redirect to
https://api.alera.build/oauth/callback. Production had no web OAuth clients, so the cloud reused the desktop clients: Google's desktop client only accepts loopback redirects (redirect_uri_mismatch), and the GitHub OAuth App only listedhttp://127.0.0.1/callback.web_google_oauth_client_idto the new Google web clientAlera Web, whose only redirect is the API callback. Its secret already has version 1 inalera-web-google-oauth-client-secret, so the new Cloud Run revision can read it.docs/remote-mcp.mdand the secret list ininfra/production/readme.md.Validation
Risk
Cloud Deploy creates a revision with the new env and secret; a failed verification rolls back automatically.