INNER CODE UNIT · JavaScript

hasThirdPartyProviderAuth

chadbyte/clay · lib/yoke/index.js:161

  function hasThirdPartyProviderAuth() {
    // Claude Code supports third-party providers via env vars. When these are set,
    // `claude auth status` reports "not logged in" because there is no OAuth session,
    // but Claude Code itself authenticates directly through the provider.
    var env = process.env;
    if (env.CLAUDE_CODE_USE_BEDROCK === "1"
        && (env.AWS_BEARER_TOKEN_BEDROCK
            || env.AWS_ACCESS_KEY_ID
            || env.AWS_PROFILE
            || env.AWS_SESSION_TOKEN)) {
      return "bedrock";
    }
    if (env.CLAUDE_CODE_USE_VERTEX === "1") return "vertex";
    if (env.ANTHROPIC_API_KEY) return "api_key";
    if (env.ANTHROPIC_AUTH_TOKEN) return "auth_token";
    return null;
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…