Skip to content

actx login

Authenticate with your AgentCTX account using a browser-based OAuth/OIDC flow with PKCE (Proof Key for Code Exchange). The session JWT is encrypted and stored locally.

Terminal window
actx login [options]
OptionDescription
--forceClear existing session and re-authenticate
  1. Reads OIDC configuration from .context/actx.yaml (auth.oidc.issuer and auth.oidc.clientId)
  2. Discovers OIDC endpoints via the provider’s .well-known/openid-configuration
  3. Generates a PKCE code verifier and challenge
  4. Opens your default browser to the authorization URL
  5. Spins up a localhost callback server (default port 8484) to receive the auth code
  6. Exchanges the code for access/ID tokens via the token endpoint
  7. Decodes JWT claims (sub, tenant_id, roles, email, org)
  8. Encrypts and stores the session in .context/.keys/session.enc

Add OIDC settings to your .context/actx.yaml:

auth:
oidc:
issuer: https://auth.agentctx.ai
clientId: actx-cli
scopes: [openid, profile, email]
callbackPort: 8484
Terminal window
$ actx login
🔐 AgentCTX Login
Discovering OIDC endpoints for https://auth.agentctx.ai...
Provider: agentctx
Opening browser for authentication...
Waiting for authentication...
Exchanging authorization code for tokens...
Logged in as developer@example.com
Organization: acme-corp
Roles: admin, developer
Session expires: 3/23/2026, 6:00:00 AM