diegosouzapw/OmniRoute · error · ClaudeAuthFileError

reauth_required

reauth_required

Error message

Claude connection is missing refresh_token. Re-authenticate this account before exporting.

What it means

Error "Claude connection is missing refresh_token. Re-authenticate this account before exporting." thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/oauth/utils/claudeAuthFile.ts:135

    toNonEmptyString(connection.email) ||
    toNonEmptyString(connection.displayName)
  );
}

export function buildClaudeAuthPayload(connection: ClaudeConnectionLike): ClaudeAuthFilePayload {
  const accessToken = toNonEmptyString(connection.accessToken);
  const refreshToken = toNonEmptyString(connection.refreshToken);

  if (!accessToken) {
    throw new ClaudeAuthFileError(
      "Claude connection is missing access_token. Refresh or re-authenticate this account first.",
      409,
      "access_token_missing"
    );
  }

  if (!refreshToken) {
    throw new ClaudeAuthFileError(
      "Claude connection is missing refresh_token. Re-authenticate this account before exporting.",
      409,
      "reauth_required"
    );
  }

  // expiresAt in DB is ISO string; the file format expects ms epoch
  const expiresAtMs = connection.expiresAt ? new Date(connection.expiresAt).getTime() : 0;

  const psd = toRecord(connection.providerSpecificData);

  const rawScopes = psd.scopes;
  const scopes: string[] = Array.isArray(rawScopes)
    ? rawScopes.filter((s): s is string => typeof s === "string")
    : [];

  const payload: ClaudeAuthFilePayload = {
    claudeAiOauth: {

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/oauth/utils/claudeAuthFile.ts:135 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/ec1d43da69fc63f1. Report an issue: GitHub.