Skip to content

fix: auth scopes#603

Merged
rupato-deriv merged 1 commit intoderiv-com:masterfrom
rupato-deriv:Rupato/Fix-google-drive-issues
Nov 4, 2025
Merged

fix: auth scopes#603
rupato-deriv merged 1 commit intoderiv-com:masterfrom
rupato-deriv:Rupato/Fix-google-drive-issues

Conversation

@rupato-deriv
Copy link
Copy Markdown
Contributor

This pull request refines the Google Drive integration by improving error handling, enhancing logging for better debugging, and updating the OAuth scope to support broader file access. The changes focus on making the file download process more robust, ensuring only owned files are shown in the picker, and providing clearer feedback in case of authentication or permission issues.

Google Drive API integration improvements:

  • Updated the Google Drive OAuth scope from drive.file to drive, allowing access to all files the user can see, not just those created by the app. (src/external/bot-skeleton/constants/config.ts)
  • Enhanced file download logic to use gapi.client.drive.files.get instead of raw fetch, added token validity checks before downloading, and improved error handling for common API errors (401, 403, 404) with user-friendly messages and forced sign-out on authentication failure. (src/stores/google-drive-store.ts)

Logging and debugging enhancements:

  • Improved configuration and runtime logging, including more detailed information about the Google Drive setup and access token, and streamlined log output for clarity. (src/stores/google-drive-store.ts) [1] [2]
  • Removed excessive or redundant logging from token verification, file loading, and picker creation methods to reduce console noise. (src/stores/google-drive-store.ts) [1] [2] [3] [4] [5]

User experience improvements:

  • Configured the Google Drive file picker to only show files owned by the current user (owner:me), preventing selection of shared files that may not be downloadable due to permission issues. (src/stores/google-drive-store.ts)

@rupato-deriv rupato-deriv merged commit 6b4cc0e into deriv-com:master Nov 4, 2025
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

Preview Link: https://Rupato-Fix-google-dr.bot-65f.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

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.

1 participant