fix(connections): make Google connector use real OAuth URL, not placeholder - #206
Merged
Conversation
…holder Follow-up to #205 (already merged). The first iteration used https://accounts.google.com/signin as a placeholder to prove the browser wiring. This replaces it with the real https://accounts.google.com/o/oauth2/v2/auth URL, scopes, and env handling: - google → gmail.readonly + userinfo.email - google-drive → drive.file + spreadsheets + userinfo.email Reads GOOGLE_CLIENT_ID / GOOGLE_REDIRECT_URI (default loopback), generates state, and opens the real consent screen via the BROWSER-aware path. No more placeholder confusion.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGoogle browser authentication now builds a Google OAuth authorization URL from environment configuration. It includes connector-specific scopes, redirect URI, offline access, consent prompting, and generated state. Missing client configuration produces an explanatory fallback URL. ChangesGoogle OAuth flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Follow-up to #205 (already merged).
Confusion: #205's first iteration used
https://accounts.google.com/signinas a placeholder to prove the browser wiring end-to-end. You flagged it correctly — the Google connector should be a real Google connector.Fix: replaces the placeholder with the real authorization URL:
https://accounts.google.com/o/oauth2/v2/auth+ scopesgoogle→gmail.readonly+userinfo.email(read an email)google-drive→drive.file+spreadsheets+userinfo.email(create/populate a Sheet)GOOGLE_CLIENT_ID/GOOGLE_REDIRECT_URI(defaulthttp://127.0.0.1:8085/oauth/callback), generatesstate,access_type=offline&prompt=consent, and opens via the BROWSER-aware path (VS Codebrowser.sh → code --openExternal).When no client is configured it still opens Google with
?error=missing_client_idrather than silently doing nothing — set the env and it does the full OAuth. No more placeholder confusion.No new UI changes — the browser wiring from #205 is unchanged.
Summary by CodeRabbit
New Features
Bug Fixes