Skip to content

feat(auth): add API key authentication for third-party access#1070

Merged
Olowodarey merged 1 commit into
Arena1X:mainfrom
Devsol-01:main
Jun 23, 2026
Merged

feat(auth): add API key authentication for third-party access#1070
Olowodarey merged 1 commit into
Arena1X:mainfrom
Devsol-01:main

Conversation

@Devsol-01

Copy link
Copy Markdown
Contributor
  • Add ApiKey entity to support securely stored hashed API keys with scopes,
    expiration dates, revocation status, and usage tracking
  • Implement ApiKeyService for generating, hashing, validating, and managing
    API keys throughout their lifecycle
  • Add ApiKeyGuard to authenticate requests using the X-API-Key header while
    attaching authenticated key information to request.user
  • Create JWT-protected API key controller endpoints for issuing and managing
    third-party credentials
  • Add scope-based authorization using the @scopes() decorator and enforce
    permission checks for API key requests
  • Add migration to create and manage the api_keys database table
  • Register API key components in the auth module
  • Add throttled last_used_at updates to prevent unnecessary database writes
    on frequent API requests
  • Ensure revoked or expired API keys are rejected with proper authentication
    errors

This introduces secure long-lived credentials for server-to-server integrations
while keeping the existing JWT authentication flow unchanged.

closes #1002

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Jun 23, 2026 10:36am

@Olowodarey Olowodarey merged commit 0d3cce5 into Arena1X:main Jun 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] — API-key authentication for programmatic / third-party access

2 participants