Skip to content

[Feature]: Support Multiple OAuth Profiles per Provider with Fallback Mechanism #805

@anurag162008

Description

@anurag162008

Problem Statement

With OAuth support:
Only one OAuth session/profile can be used
If access token fails / expires unexpectedly
If account hits limits or gets restricted
👉 The workflow stops and requires manual re-authentication or switching

Proposed Solution

Multiple OAuth Profiles per Provider
Allow users to configure multiple OAuth profiles under a single provider.
Example:
provider: openai/codex
profiles:

  • type: oauth
    name: account_1
    access_token: auto
    refresh_token: auto

  • type: oauth
    name: account_2
    access_token: auto
    refresh_token: auto

  • type: oauth
    name: account_3
    access_token: auto
    refresh_token: auto

Alternatives Considered

No response

Success Criteria

Users can add multiple OAuth profiles under a single provider
Each OAuth profile maintains independent tokens (access + refresh)
System automatically switches to the next available OAuth profile when:
Access token fails
Rate limit is hit
API request returns error/timeout
No interruption in running tasks during profile switching
Each profile supports:
Automatic token refresh
Expiry handling without affecting other profiles
Users can:
Set priority/order of OAuth profiles
Identify profiles using custom names
UI allows:
Adding multiple OAuth logins per provider
Viewing profile status (active / expired / failed)
System tracks profile state and avoids repeatedly using failed profiles (cooldown/retry logic)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions