Skip to content

Update Google Drive OAuth setup instructions - #6

Merged
R-YaTian merged 2 commits into
R-YaTian:masterfrom
Anyupay:docs/update-google-drive-oauth
May 20, 2026
Merged

Update Google Drive OAuth setup instructions#6
R-YaTian merged 2 commits into
R-YaTian:masterfrom
Anyupay:docs/update-google-drive-oauth

Conversation

@Anyupay

@Anyupay Anyupay commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the Google Drive setup instructions.

The existing guide uses a Desktop OAuth client and the legacy OOB copy/paste authorization code flow, then asks users to store driveAuthCode in drive.json. In current Google OAuth behavior, refresh tokens issued to External apps in Testing mode can expire after 7 days when using Drive scopes.

This documentation update describes a tested longer-lived setup:

  • publish the OAuth app to In production for personal use
  • create a Web application OAuth client
  • add OAuth Playground as an authorized redirect URI
  • generate a refresh token with OAuth Playground using the user's own OAuth credentials
  • configure TYSS with driveRefreshToken instead of driveAuthCode

Notes

No code changes are included. This is documentation-only.

Users are warned not to share or commit real client secrets or refresh tokens.

Copilot AI review requested due to automatic review settings May 19, 2026 14:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Google Drive setup guide for TYSS to use OAuth Playground and a refresh token–based drive.json configuration, with added security warnings and troubleshooting notes.

Changes:

  • Replaces the prior auth-code (OOB) flow with an OAuth Playground flow to obtain a refresh token.
  • Updates the drive.json schema to use driveRefreshToken and adds driveInitOnBoot.
  • Adds security guidance and a small troubleshooting section for common OAuth errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread GD_INSTRUCTIONS.MD
3. Search for `Google Drive API` and enable it.
4. Open `Google Auth Platform` or `OAuth consent screen`.
5. Configure the OAuth consent screen. For personal use, fill in the required app name, user support email, and developer contact email.
6. Add the Drive scope:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Comment thread GD_INSTRUCTIONS.MD Outdated
https://www.googleapis.com/auth/drive
```

7. If your OAuth app remains `External` and `Testing`, Google may expire refresh tokens for the Drive scope after 7 days. To avoid that, publish the app to `In production` for personal use.
Comment thread GD_INSTRUCTIONS.MD
Comment on lines +20 to +21
9. Click `+ CREATE CREDENTIALS`, then `OAuth client ID`.
10. Set `Application type` to `Web application`. Do not use `Desktop app`.
Comment thread GD_INSTRUCTIONS.MD Outdated
Comment on lines +50 to +53
"driveClientID": "YOUR_WEB_CLIENT_ID_HERE",
"driveClientSecret": "YOUR_WEB_CLIENT_SECRET_HERE",
"driveRefreshToken": "YOUR_REFRESH_TOKEN_HERE",
"driveInitOnBoot": true
@Anyupay

Anyupay commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

@R-YaTian

Copy link
Copy Markdown
Owner

Have you completed all the document changes?

@Anyupay

Anyupay commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Yes

@R-YaTian
R-YaTian merged commit b43c245 into R-YaTian:master May 20, 2026
1 check passed
@Anyupay
Anyupay deleted the docs/update-google-drive-oauth branch May 20, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants