Agent skill · security · aj-geddes

api-authentication

Implement secure API authentication with JWT, OAuth 2.0, API keys, and session management. Use when securing APIs, managing tokens, or implementing user authentication flows.

Why this skill is useful

Provides specific implementation patterns for secure API authentication methods that the AI wouldn't reliably generate on its own.

What it needs

About 2k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

API Authentication Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Implement comprehensive authentication strategies for APIs including JWT tokens, OAuth 2.0, API keys, and session management with proper security practices. When to Use Securing API endpoints Implementing user login/logout flows Managing access tokens and refresh tokens Integrating OAuth 2.0 providers Protecting sensitive data Implementing API key authentication Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- JWT Authentication JWT Authentication OAuth 2.0 Implementation OAuth 2.0 Implementation API Key Authentication API Key Authentication Python Authentication Implementation Python Authentication Implementation Best Practices ✅ DO Use HTTPS for all authentication Store tokens securely (HttpOnly cookies) Implement token refresh mechanism Set appropriate token expiration times Hash and salt passwords Use strong secret keys Validate tokens on every request Implement rate limiting on auth endpoints Log authentication attempts Rotate secrets regularly ❌ DON'T Store passwords in plain text Send tokens in URL parameters Use weak secret keys Store sensitive data in JWT payload Ignore token expiration Disable HTTPS in production Log sensitive tokens Reuse API keys across services Store credentials in code

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/api-authentication

View the source on GitHub

Browse the @skills marketplace