Repository navigation
feat(sheets): read as a Google user through installed-app OAuth - #190
Merged
Merged
Conversation
Deploying sqlload with
|
| Latest commit: |
9ca4be3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fec0219c.sqlload.pages.dev |
| Branch Preview URL: | https://feat-sheets-user-oauth.sqlload.pages.dev |
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.
Lets a
google_sheetsconnection read spreadsheets as a Google user, through an installed-app (Desktop) OAuth client, as well as with a service account.Status: user OAuth tested against a simulated Google endpoint, not yet against live Google. The service-account path is unchanged and keeps its live coverage.
Config:
client_idandclient_secret, plus an optionalrefresh_tokenfor unattended runs. A connection sets at most one of the three service-account key settings orclient_id;planrefuses other combinations.Flow:
spreadsheets.readonly, withaccess_type=offlineandprompt=consent select_account. It reuses Snowflake's loopback/paste sign-in, now shared asbrowser_code(first commit, a refactor with no behaviour change).sqlload/google-tokens.jsonbelow the user's cache folder (0600), keyed"<client_id> <connection>".--json, the run fails at once and says how to sign in.Tests:
/tokenroute now refuses revoked refresh tokens: a configured refresh token loads; a revoked one exits 1 withretryable: false; a--jsonrun with nothing cached fails without prompting; mixed or half-set credentials are refused.Docs: a new "Sign in as a Google user" section in sources/google-sheets.mdx, marked 0.35.0 (not released yet). The exact consent steps are on CHI-1240.
Closes CHI-1240.