Skip to content

Commit f0f6c3d

Browse files
committed
chore: update stale token references in auth comment and .env.example
1 parent d795677 commit f0f6c3d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dashboard/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ NEXT_PUBLIC_BASE_PATH=""
44
NEXT_PUBLIC_SUPABASE_URL=your-project-url
55
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_... or anon key
66

7-
ACONTEXT_API_BEARER_TOKEN=your-root-api-bearer-token
7+
ACONTEXT_API_BEARER_TOKEN=AaGyw9Tl9qe4ydDh8qO0xdZNkrobQvwHWFRsnp5a3QtfbaDSDJQeRHxXPr4bGpc0g130EqBSjRNF
88
ACONTEXT_PROJECT_BEARER_TOKEN_PREFIX=sk-ac-
99

1010
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=xxx

src/server/api/go/internal/middleware/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const (
7171
)
7272

7373
// ProjectAuth returns a middleware that authenticates requests using project bearer tokens.
74-
// Token format: sk-ac-{auth_secret}.{encrypted_master_key}
75-
// Derives a KEK and stores it in context for downstream encryption operations.
74+
// Token formats: compact (sk-ac-{base64url, 76 chars}) or legacy (sk-ac-{plain_secret}).
75+
// For compact tokens, derives a KEK and stores it in context for downstream encryption.
7676
// It caches project lookups in Redis to avoid hitting the database on every request.
7777
func ProjectAuth(cfg *config.Config, db *gorm.DB, rdb *redis.Client) gin.HandlerFunc {
7878
return func(c *gin.Context) {

0 commit comments

Comments
 (0)