Skip to main content

Auth

Kadaikodi uses Burdenoff Workspaces for identity. All authentication flows are standard OAuth2 on the platform's OIDC provider.

Flows

Device Code (interactive / CLI / extensions)

Best for CLIs, browser extensions, and VS Code — any scenario where the user is present but the client cannot host a redirect URI.

kadaikodi auth login
  1. CLI requests a device code from the platform
  2. User opens the verification URL in a browser and enters the code
  3. User authenticates and authorizes the client
  4. CLI polls for tokens and receives access + refresh tokens

Authorization Code + PKCE (web apps / mobile)

Best for web and mobile apps that can receive a redirect.

const challenge = sdk.auth.getAuthorizationUrl({
redirectUri: "https://app.kadaikodi.com/callback",
scopes: ["openid", "profile", "email", "offline_access"],
});
// Redirect user to challenge.url
// After redirect back, exchange:
const tokens = await sdk.auth.exchangeAuthCode(code, challenge.codeVerifier, challenge.redirectUri);

Client Credentials (service-to-service / M2M)

Best for backend integrations, cron jobs, and AI agents.

await sdk.auth.authenticateApp(clientId, clientSecret);

Email / Password (SDK only)

Direct sign-in for scripted scenarios.

await sdk.auth.signIn({ username: "[email protected]", password: "secret" });

Tokens

TokenPurposeLifetimeStorage
Access tokenAuthenticates API calls~1 hourMemory or secure storage
Refresh tokenObtains new access tokens~30 daysSecure storage (mode 0600)
Workspace tokenScopes calls to a workspace~15 minutesAlongside access token

Required headers

Every GraphQL call must include:

Authorization: Bearer <access-token>
x-workspace-id: <workspace-uuid>

The workspace token is sent automatically by the SDK and CLI when a workspace is selected.

Environment-specific OIDC

EnvOIDC issuerClient ID (CLI)
prodhttps://graphql.burdenoff.com/globalburdenoff_cli_kadaikodi
alphahttps://alphagraphql.burdenoff.com/globalburdenoff_cli_kadaikodi
localhttp://localhost:4000/globalburdenoff_cli_kadaikodi

Override with KADAIKODI_OIDC_ISSUER.

Next steps