Skip to content

Bug: OAuth Session Expired Cannot Be Refreshed #86

Description

@malys

Summary

The application sometimes loses authentication and displays:

Failed to authenticate: OAuth session expired and could not be refreshed

The user must manually reauthenticate even though the application should ideally refresh the session automatically.

Environment

  • Claude Code Studio: v7.x
  • Authentication: OAuth
  • Provider: [provider name if known]

Current Behavior

The application displays:

Failed to authenticate: OAuth session expired and could not be refreshed

Actions requiring authentication stop working until the user manually reconnects.

Expected Behavior

When an OAuth access token expires:

  1. The refresh token should be used automatically.
  2. The session should remain active.
  3. The user should only be prompted to log in again if refresh has genuinely failed.

Suggestions

  • Display the root cause of the refresh failure.
  • Log OAuth refresh attempts.
  • Indicate whether:
    • the refresh token is missing,
    • the refresh token is expired,
    • the provider rejected the refresh request,
    • the network request failed.
  • Provide a "Reconnect" button directly from the error message.

Impact

  • Interrupted workflows.
  • Long-running tasks may stop unexpectedly.
  • Users must manually reauthenticate.

Priority

High

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions