auth-implementation-patterns

Implement JWT, OAuth2, session, and RBAC authentication patterns for APIs and web apps.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/haxlys/skills --skill auth-implementation-patterns-haxlys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-implementation-patterns
Source: https://github.com/haxlys/skills/tree/main/vendored/wshobson-agents/plugins/developer-essentials/skills/auth-implementation-patterns
Command: npx skills add https://github.com/haxlys/skills --skill auth-implementation-patterns-haxlys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build robust authentication and authorization systems using well-established patterns to secure modern applications and APIs.

Core Features & Use Cases

  • JWT-based authentication with access and refresh tokens, including token revocation and rotation.
  • Session-based authentication with secure cookie storage for web apps.
  • OAuth2/OpenID Connect integration and social login flows.
  • Role-Based Access Control (RBAC) and Permission-based access control for fine-grained authorization.
  • Resource ownership checks and security best practices (input validation, rate limiting, etc).
  • Guidance for implementing these patterns across REST, GraphQL, and microservices architectures.

Quick Start

Describe your project's authentication needs and I'll generate an implementation plan using JWT, OAuth2, or session-based patterns.

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 refresh tokens for a REST API?

JWT-based authentication secures REST APIs by issuing short-lived access tokens and rotating refresh tokens. It supports token revocation to invalidate compromised sessions.

What is the best way to set up role-based access control (RBAC) in microservices?

Role-Based Access Control (RBAC) in microservices uses permission-based checks and resource ownership validation to enforce fine-grained authorization across distributed services.

How does OAuth2 social login integration work for web applications?

OAuth2 social login integration works by redirecting users to third-party providers for authentication, then validating tokens and establishing secure session-based cookie storage in the web app.

Can I use session-based authentication with secure cookies for my web app?

Yes, session-based authentication uses secure cookie storage to manage user identities in web apps. It provides a stateful alternative to JWT for applications requiring immediate session revocation.

When should I choose session management over JWT for securing modern applications?

Choose session management over JWT when your web app requires immediate server-side session revocation and secure cookie storage. Use JWT for stateless REST APIs and microservices needing token portability.