auth-implementation-patterns

Implement JWT, OAuth2, and RBAC authentication patterns for APIs.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill auth-implementation-patterns-ccf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-implementation-patterns
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/developer-essentials/skills/auth-implementation-patterns
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill auth-implementation-patterns-ccf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill provides a comprehensive set of authentication and authorization patterns to help you design secure, scalable access control systems for modern applications.

Core Features & Use Cases

  • JWT-based authentication: Implement access and refresh tokens with robust validation and rotation.
  • OAuth2/OpenID Connect integration: Enable social login and enterprise SSO while maintaining secure delegation.
  • RBAC and permissions: Enforce role-based and attribute-based access controls across APIs, services, and data layers.
  • Session management patterns: Choose between token-based and session-based approaches to fit your architecture.
  • Use Case: Secure a REST or GraphQL API with protected routes and role checks in a multi-tenant environment.

Quick Start

Use the auth-implementation-patterns skill to implement a JWT-based login flow for an Express API and secure a /profile endpoint with RBAC.

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-based authentication with access and refresh tokens in an Express API?

Implement JWT-based authentication by creating a login flow that issues short-lived access tokens and long-lived refresh tokens. This skill provides code examples to validate tokens and secure endpoints with role checks.

What is the best way to enforce RBAC and permissions in a multi-tenant microservices architecture?

The best way to enforce RBAC in multi-tenant microservices is by applying role-based and attribute-based access controls across APIs and data layers. This skill offers patterns to secure service boundaries and manage tenant-specific permissions.

How does OAuth2 and OpenID Connect integration work for enterprise SSO and social login?

OAuth2 and OpenID Connect integration works by enabling secure delegation and identity verification for enterprise SSO and social login. This skill provides patterns to implement these protocols while maintaining secure access control.

When should I choose token-based authentication over session management for my application?

Choose token-based authentication for stateless scalability across distributed systems, or session management for centralized control. This skill helps you evaluate token versus session approaches to match your specific architectural needs.

Can I use these authorization patterns to secure both REST and GraphQL APIs?

Yes, you can use these authorization patterns to secure both REST and GraphQL APIs. The skill covers implementing protected routes, validating JWTs, and enforcing role checks across modern application endpoints.

Why do I need to rotate JWT refresh tokens and what are the limitations of token-based security?

You need to rotate JWT refresh tokens to limit vulnerability windows if a token is compromised. Limitations of token-based security include stateless revocation challenges, which this skill addresses through robust validation and rotation patterns.