Skip to content

fix: google drive provider prevent auto popup - #3660

Merged
igorDykhta merged 3 commits into
masterfrom
igr/google-drive-prevent-auto-popup
Aug 23, 2026
Merged

fix: google drive provider prevent auto popup#3660
igorDykhta merged 3 commits into
masterfrom
igr/google-drive-prevent-auto-popup

Conversation

@igorDykhta

Copy link
Copy Markdown
Collaborator
  • google drive storage provider: prevent auto popup on token refresh

Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
@igorDykhta
igorDykhta requested review from lixun910 and a lite review from Copilot August 22, 2026 09:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the demo app’s Google Drive provider to prevent automatic OAuth popups during token checks.

Changes:

  • Removes silent GIS token refresh.
  • Adjusts login prompts based on stored session state.
  • Updates token request comments.
Suppressed comments (1)

examples/demo-app/src/cloud-providers/google-drive/google-drive-provider.js:85

  • _readStorage() deliberately returns null when localStorage is unavailable, but this new no-GIS path then ignores the in-memory token and clears _accessToken. _requestAccessToken sets that field even when _writeStorage is a no-op, so a successful login in a browser without usable storage cannot be used for list/upload/download. Keep the in-memory token as a no-popup fallback and let the existing 401 handling invalidate it.
    // Reuse cached token only while expiresAt says it is still valid.
    // Do not call GIS here: requestAccessToken always opens a popup, and
    // CloudTile calls getUser() on mount (Load From Storage / Save Map).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Ihor Dykhta added 2 commits August 23, 2026 11:32
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
@igorDykhta
igorDykhta merged commit 2f60c22 into master Aug 23, 2026
7 checks passed
@igorDykhta
igorDykhta deleted the igr/google-drive-prevent-auto-popup branch August 23, 2026 11:05
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