Documentation
Authentication
Browser login and token-based remote access
CLI Authentication
CLI authentication only matters for remote profiles.
Browser Login Flow
bash
cache auth login --name server --base-url http://localhost:3000Flow:
- CLI starts localhost callback server
- CLI prints browser login URL
- You open URL in browser
- Server redirects back with one-time code
- CLI exchanges code for API token
- CLI stores remote profile token
Manual Token Login
bash
cache auth login --name server --base-url http://localhost:3000 --token <token>Who Am I
bash
cache auth whoamiRemote mode returns server-side profile info. Direct mode returns local profile identity.
Logout
bash
cache auth logoutRemoves active profile from local CLI config.
Security Notes
- Browser login callback must be localhost loopback URL
- Browser-login exchange requires server
ENCRYPTION_KEY - API tokens are bearer tokens; protect them like passwords