auth-implementation-patterns

Implement JWT, OAuth2, session management, and RBAC for REST or GraphQL APIs.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/goodnight000/KittyCourt --skill auth-implementation-patterns-goodnight000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-implementation-patterns
Source: https://github.com/goodnight000/KittyCourt/tree/main/.codex/skills/auth-implementation-patterns
Command: npx skills add https://github.com/goodnight000/KittyCourt --skill auth-implementation-patterns-goodnight000

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Build secure, scalable authentication and authorization systems for modern applications.

Core Features & Use Cases

  • JWT-based authentication with access and refresh tokens.
  • OAuth2/OpenID Connect integration and RBAC policy enforcement.
  • Session management and security best practices for API servers.

Quick Start

  • Implement a JWT-based login flow with access and refresh tokens.
  • Integrate OAuth2 with Google or GitHub for social sign-in.
  • Add RBAC protections to a sample REST API.

Frequently Asked Questions about auth-implementation-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT authentication with access and refresh tokens for a REST API?

JWT authentication requires issuing short-lived access tokens and long-lived refresh tokens to validate API requests without storing sessions. This pattern demonstrates token issuance, validation, and secure session handling using common server-side libraries.

What's the best way to add OAuth2 social sign-in to a scalable application?

OAuth2 integration for social sign-in involves configuring authorization flows with providers like Google or GitHub to delegate authentication securely. This approach demonstrates OAuth2 flows and OpenID Connect integration to establish user identity across modern applications.

How does RBAC policy enforcement work for securing GraphQL and REST services?

RBAC policy enforcement works by assigning users to specific roles and checking those roles against access permissions before allowing API operations. You can apply RBAC and ABAC policies to protect endpoints across both REST and GraphQL services.

When do I need session management versus stateless JWT tokens for API servers?

Session management is needed when you require server-side state tracking for immediate revocation, while stateless JWT tokens are better for horizontally scalable APIs. This implementation demonstrates both secure session handling and token-based authentication patterns.

Can I use this approach to audit and secure existing API authentication systems?

Auditing API authentication systems involves reviewing token validation, OAuth2 flows, and RBAC policies for security vulnerabilities. These patterns are suitable for building, securing, or auditing existing APIs by demonstrating token issuance and security best practices.