Skip to content

[Bug]: Google Drive Connection Fails After OpenRAG Restart Due to Missing Refresh Token #1649

@ricofurtado

Description

@ricofurtado

OpenRAG Version

0.5.0

Deployment Method

Other

Operating System

macOS

Python Version

3.13

Affected Area

Connectors (Google Drive, OneDrive, SharePoint)

Bug Description

After restarting OpenRAG, clicking the Google Drive Connect option does not successfully reconnect to Google Drive. The integration appears as not connected, even though the user previously completed the OAuth flow.

The issue appears to be related to the OAuth configuration used by the Google Drive connector. Both OAuth flows currently use:

prompt=select_account

### Steps to Reproduce

Restart OpenRAG or the session is interrupted unexpectedly 

### Expected Behavior

After OpenRAG restarts, the Google Drive connector should remain connected or should be able to reconnect successfully.

The OAuth flow should ensure that OpenRAG receives and stores a valid refresh_token so that expired access tokens can be refreshed automatically.

### Actual Behavior

After OpenRAG is restarted:

Google Drive appears as not connected
Clicking Google Drive Connect does not restore the connection properly
The OAuth flow does not return a new refresh_token
The existing access token expires after approximately 1 hour
OpenRAG can no longer access Google Drive until a full consent flow is forced again

### Relevant Logs

```shell

Screenshots

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported before.
  • I have provided all the requested information.

Metadata

Metadata

Assignees

Labels

bug🔴 Something isn't working.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions