Skip to content

Authentication

Condrix supports two methods for authenticating a Core with the Claude AI service: OAuth (recommended) and API Key.

OAuth is the recommended authentication method. It uses your existing Claude account — no API keys to create or manage.

Condrix authenticates using the same OAuth flow as the Claude Code CLI. Under the hood, each Core runs a Claude CLI subprocess that handles:

  • OAuth token acquisition and refresh
  • Request signing with the correct beta headers
  • Secure credential storage in ~/.claude/.credentials.json

This means your Core authenticates as a Claude Code session, using your Claude plan’s usage allocation.

  1. Open the Web Client and connect to your Core
  2. Go to SettingsCores tab
  3. Click Sign In with Claude next to your Core
  4. Your browser opens the Claude authorization page
  5. Sign in with your Claude account and approve the request
  6. You receive an authorization code — paste it back into the dialog
  7. The Core exchanges the code for access and refresh tokens
TokenFormatLifetimePurpose
Access Tokensk-ant-oat01-...Short-livedAuthenticates API requests
Refresh Tokensk-ant-ort01-...Long-livedObtains new access tokens

The Core automatically refreshes expired access tokens using the refresh token. You should rarely need to re-authenticate manually.

The OAuth flow requests these scopes:

  • user:inference — Send messages to Claude
  • user:profile — Read account information
  • user:sessions:claude_code — Create Claude Code sessions
  • user:mcp_servers — Access MCP server configurations

Rather than making direct API calls, each Core spawns a Claude Code CLI subprocess to handle AI interactions. This provides:

  • Automatic OAuth handling — The subprocess manages tokens transparently
  • Correct request format — Requests match the exact shape Claude’s API expects
  • Beta header injection — The anthropic-beta: oauth-2025-04-20 header is included automatically
  • Extended thinking support — Works with Claude’s extended thinking features

For development or when OAuth is not available, you can provide a Claude API key directly.

Set the API key as an environment variable before starting the Core:

Terminal window
export CONDRIX_CORE_CLAUDE_API_KEY=sk-ant-api03-...
npm run dev:core

Or add it to a .env file in the Core’s directory:

Terminal window
CONDRIX_CORE_CLAUDE_API_KEY=sk-ant-api03-...
OAuthAPI Key
SetupBrowser sign-inCopy-paste key
Token refreshAutomaticN/A (key doesn’t expire)
Usage billingClaude planAPI billing
SecurityShort-lived tokensLong-lived key
RecommendedYesDevelopment only

Each Core provides a built-in terminal accessible from the web client. This terminal runs on the Core’s host machine and can be used for administrative tasks:

  • Checking authentication status
  • Viewing Core logs
  • Running Git commands in workspaces
  • Installing system dependencies

Access it from the Terminal panel in the web client’s right sidebar.

  • OAuth tokens are stored in ~/.claude/.credentials.json on the Core’s host machine
  • Tokens are never sent to clients — the Core proxies all AI requests
  • Each Core authenticates independently — revoking access to one Core doesn’t affect others
  • For remote Cores, always use Cloudflare Tunnel or another encrypted transport