Stu Mason
Stu Mason

Activity

Pull Request Opened

PR #15 opened: feat: Add API key regenerate/revoke from admin dashboard

Summary

  • Adds admin-level API key management using session authentication (no API key required)
  • Solves the chicken-and-egg problem where you needed an API key to regenerate your API key
  • Adds Regenerate and Revoke buttons to the API Keys table in the dashboard
  • Shows new key once after regeneration with copy-to-clipboard functionality

Changes

  • POST /admin/api-keys/{key_id}/regenerate - regenerate a key from admin panel
  • POST /admin/api-keys/{key_id}/revoke - revoke a key from admin panel
  • Action buttons in API Keys table with confirmation modals
  • Partial templates for success states

Test plan

  • Login to admin dashboard
  • Navigate to API Keys section
  • Click "Regenerate" on an active key
  • Verify confirmation modal appears with warning
  • Confirm regeneration and verify new key is displayed
  • Copy the new key and verify it works for API access
  • Test "Revoke" action similarly
  • Verify revoked keys show as "Revoked" in the table

Stu Mason + AI [email protected]

+709
additions
-22
deletions
7
files changed