39 lines
997 B
Markdown
39 lines
997 B
Markdown
# Prime OAuth Bootstrap (OpenAI + Anthropic Claude Code)
|
|
|
|
Prime OAuth broker runs locally on shard-host:
|
|
- Service: `prime-oauth.service`
|
|
- Health: `http://127.0.0.1:8787/health`
|
|
|
|
## 1) Configure providers
|
|
Edit:
|
|
`/srv/prime-core/config/oauth/providers.json`
|
|
|
|
For each provider (`openai`, `anthropic`), set:
|
|
- `client_id`
|
|
- `client_secret`
|
|
- `auth_url`
|
|
- `token_url`
|
|
- `scopes`
|
|
|
|
## 2) Start OAuth flow
|
|
Request auth URL:
|
|
```bash
|
|
curl "http://127.0.0.1:8787/auth/anthropic/start?redirect_uri=<YOUR_REDIRECT_URI_URLENCODED>"
|
|
```
|
|
Open returned `auth_url` in browser, authorize, then callback hits:
|
|
`/auth/anthropic/callback?code=...&state=...`
|
|
|
|
Do same for OpenAI provider.
|
|
|
|
## 3) Validate token presence
|
|
```bash
|
|
source /srv/prime-core/scripts/prime-env.sh
|
|
prime status
|
|
```
|
|
`oauth_providers` should include `openai` and `anthropic`.
|
|
|
|
## Notes
|
|
- Prime is OAuth-only by policy.
|
|
- No API keys are used for model runtime access.
|
|
- Token material is encrypted at rest in `/srv/prime-core/state/tokens.enc`.
|