authentication-patterns

Design OAuth, JWT, session, and RBAC/ABAC authentication for web, mobile, and API apps.

3|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/1Mangesh1/dev-skills-collection --skill authentication-patterns-1mangesh1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authentication-patterns
Source: https://github.com/1Mangesh1/dev-skills-collection/tree/main/skills/authentication-patterns
Command: npx skills add https://github.com/1Mangesh1/dev-skills-collection --skill authentication-patterns-1mangesh1

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Authentication and authorization patterns and best practices for modern applications across web, mobile, and API stacks.

Core Features & Use Cases

  • Comprehensive guidance on OAuth 2.0, OpenID Connect, JWT, and session-based authentication
  • Authorization patterns including RBAC, ABAC, PBAC, and SSO strategies
  • Security best practices, risk considerations, and design patterns with reference implementations

Quick Start

Provide a ready-to-implement authentication and authorization plan for a web app using OAuth2, JWT, MFA, and RBAC.

Frequently Asked Questions about authentication-patterns

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

FAQPage Schema
How do I implement OAuth 2.0 and JWT authentication for a web application?

Implement OAuth 2.0 and JWT authentication by following established design patterns that cover token generation, session management, and secure routing for modern web stacks. Reference implementations provide ready-to-use integration steps.

What is the best way to structure RBAC and ABAC authorization in APIs?

The best way to structure RBAC and ABAC authorization is applying design patterns that enforce attribute and role checks at the API gateway or middleware layer. This ensures consistent permission validation across protected resources.

How does single sign-on (SSO) work with modern mobile and API stacks?

Single sign-on (SSO) works by centralizing authentication across mobile and API stacks using shared token validation and identity provider integration. Secure patterns ensure seamless session propagation across different application endpoints.

Can I use MFA and API key strategies together in my application?

Yes, you can use MFA and API key strategies together by layering multi-factor verification for user access alongside API keys for service-to-service communication. This combined approach strengthens overall application security.

When should I choose session-based authentication over JWT?

Choose session-based authentication over JWT when you need immediate revocation capabilities and centralized session control. JWT works better for stateless, distributed API environments where server-side storage is minimized.

What are the security risk considerations when implementing OAuth patterns?

Security risk considerations for OAuth patterns include token theft, improper scope validation, and redirect URI vulnerabilities. Following established best practices and reference implementations mitigates these design challenges effectively.