Skip to content

Support multiple OAuth subscriptions for the same Anthropic account (UUID) #7

@brendandebeasi

Description

@brendandebeasi

Use Case

I have two Claude subscriptions under the exact same email address (and therefore the same Anthropic User ID / accountUuid). One is a Pro corporate account, and the other is a personal Max account.

The Problem

Currently, I cannot connect both of them to TeamClaude simultaneously. When I attempt to connect the second account, it overwrites the first one.

Based on the logic in src/index.js -> upsertOAuthAccount:

  // Deduplicate: match by UUID first, then by name
  let idx = profile?.accountUuid
    ? config.accounts.findIndex(a => a.accountUuid === profile.accountUuid)
    : -1;
  if (idx < 0) idx = config.accounts.findIndex(a => a.name === name);

The aggressive deduplication matches on accountUuid. Even if I pass a custom name during login (e.g., teamclaude login --name personal and teamclaude login --name corporate), the UUID check triggers an overwrite.

Proposed Solution

I'd like to propose adjusting the deduplication logic. If a user explicitly provides a --name flag that differs from existing accounts, it should bypass the strict UUID match and allow the account to be added alongside the other one.

Is this the right approach? If so, I am happy to submit a PR to address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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