Skip to content

Commit cd76a7c

Browse files
committed
Updated doc
1 parent d0430ef commit cd76a7c

File tree

11 files changed

+15
-13
lines changed

11 files changed

+15
-13
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ proxy.log
193193
dashboard.log
194194

195195
# Credentials (keep the directory but not the files)
196-
credentials/*.json
197-
credentials/*.credentials.json
196+
credentials/
197+
!credentials/.gitkeep
198+
!credentials/*/.gitkeep
199+
!credentials/README.md
198200

199201
# Temporary files
200202
*.tmp

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Follow [Repository Grooming](docs/01-Getting-Started/repository-grooming.md) for
222222
```bash
223223
# Installation (2 commands)
224224
bun install # Install dependencies
225-
bun run scripts/init-database.ts # Initialize database (requires DATABASE_URL in .env)
225+
bun run scripts/db/migrations/000-init-database.ts # Initialize database (requires DATABASE_URL in .env)
226226

227227
# Development (3 commands)
228228
bun run dev # Run both services

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Follow [Repository Grooming](docs/01-Getting-Started/repository-grooming.md) for
222222
```bash
223223
# Installation (2 commands)
224224
bun install # Install dependencies
225-
bun run scripts/init-database.ts # Initialize database (requires DATABASE_URL in .env)
225+
bun run scripts/db/migrations/000-init-database.ts # Initialize database (requires DATABASE_URL in .env)
226226

227227
# Development (3 commands)
228228
bun run dev # Run both services

credentials/accounts/.gitkeep

Whitespace-only changes.

credentials/train-client-keys/.gitkeep

Whitespace-only changes.

docs/02-User-Guide/authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ curl -X POST http://proxy:3000/v1/messages \
3535
Generate a secure client API key:
3636

3737
```bash
38-
bun run scripts/generate-api-key.ts
38+
bun run scripts/auth/generate-api-key.ts
3939
```
4040

4141
### Disabling Client Authentication
@@ -177,7 +177,7 @@ JSON
177177
For OAuth authentication:
178178

179179
```bash
180-
bun run scripts/oauth-login.ts credentials/accounts/account-primary.credentials.json
180+
bun run scripts/auth/oauth-login.ts credentials/accounts/account-primary.credentials.json
181181
```
182182

183183
### Step 3: Configure Request Headers
@@ -251,7 +251,7 @@ bun run scripts/oauth-refresh-all.ts credentials
251251
**Solution:**
252252

253253
```bash
254-
bun run scripts/oauth-login.ts credentials/accounts/account-primary.credentials.json
254+
bun run scripts/auth/oauth-login.ts credentials/accounts/account-primary.credentials.json
255255
```
256256

257257
#### "No refresh token available"

scripts/auth/check-oauth-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function checkOAuthStatus() {
6767
console.error(
6868
'\nERROR: Token is expired and no refresh token available. Re-authentication required!'
6969
)
70-
console.log(`Run: bun run scripts/oauth-login.ts ${credentialPath}`)
70+
console.log(`Run: bun run scripts/auth/oauth-login.ts ${credentialPath}`)
7171
}
7272
} else if (credentials.type === 'api_key') {
7373
console.log(

scripts/auth/oauth-login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ async function main() {
77
const credentialPath = process.argv[2]
88

99
if (!credentialPath) {
10-
console.error('Usage: bun run scripts/oauth-login.ts <credential-path>')
10+
console.error('Usage: bun run scripts/auth/oauth-login.ts <credential-path>')
1111
console.error(
12-
'Example: bun run scripts/oauth-login.ts credentials/example.com.credentials.json'
12+
'Example: bun run scripts/auth/oauth-login.ts credentials/example.com.credentials.json'
1313
)
1414
process.exit(1)
1515
}

scripts/auth/oauth-refresh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async function refreshOAuthToken() {
6262

6363
if (!oauth.refreshToken) {
6464
console.error('\nERROR: No refresh token available. Re-authentication required.')
65-
console.error(`Run: bun run scripts/oauth-login.ts ${credentialPath}`)
65+
console.error(`Run: bun run scripts/auth/oauth-login.ts ${credentialPath}`)
6666
process.exit(1)
6767
}
6868

services/proxy/src/credentials.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ export async function getApiKey(
435435
// Check for specific error codes
436436
if (refreshError.errorCode === 'invalid_grant' || refreshError.status === 400) {
437437
console.error('Refresh token is invalid or expired. Re-authentication required.')
438-
console.error(`Please run: bun run scripts/oauth-login.ts ${credentialPath}`)
438+
console.error(`Please run: bun run scripts/auth/oauth-login.ts ${credentialPath}`)
439439
}
440440

441441
return null

0 commit comments

Comments
 (0)