auth-implementation-patterns

Design JWT, OAuth2, and RBAC authentication workflows for API backends.

Updated May 16, 2026
One-click install
npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill auth-implementation-patterns-p-o-ke-nae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-implementation-patterns
Source: https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory/tree/main/.github/skills/auth-implementation-patterns
Command: npx skills add https://github.com/p-o-ke-nae/pokemondamagecalculatorforstory --skill auth-implementation-patterns-p-o-ke-nae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design and implement secure authentication and authorization systems without piecing together insecure patterns from scratch. It reduces the risk of weak login flows, broken permissions, and inconsistent security decisions across your application.

Core Features & Use Cases

  • Authentication Strategies: Choose between JWT, refresh tokens, and session-based login depending on your architecture.
  • Authorization Controls: Apply RBAC, permission checks, and resource ownership rules to protect APIs and actions.
  • Security Hardening: Strengthen password handling, cookie settings, rate limiting, and token validation.
  • Use Case: Use this Skill when adding sign-in, social login, admin permissions, or secure logout flows to a web API.

Quick Start

Ask for a secure authentication design for your app and specify whether you need JWT, sessions, OAuth2, or role-based authorization.

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 secure JWT authentication and refresh tokens in my API backend?

To implement JWT authentication securely, you design workflows for token issuance, validation, and refresh token rotation. This ensures robust API access control by managing secure cookie settings and session expiration.

What is the best way to set up OAuth2 social login for a modern web application?

Setting up OAuth2 social login involves designing external authorization workflows that integrate with your application. This handles secure token exchange and maps external identities to your internal session or JWT management system.

How do I apply RBAC and resource ownership rules to protect API endpoints?

Applying RBAC and resource ownership involves creating permission checks that validate user roles before granting access. This protects API actions by ensuring users can only interact with resources they explicitly own or are authorized to manage.

How do I mitigate CSRF and strengthen cookie security during user authentication?

Mitigating CSRF and strengthening cookie security requires configuring strict cookie attributes and implementing validation workflows. This hardens the authentication process by preventing cross-site attacks and ensuring secure session handling.

When should I choose session-based authentication over JWT for my application architecture?

Choosing session-based authentication over JWT depends on your application architecture and scaling requirements. Sessions offer centralized state management, while JWT provides stateless token validation, making the choice dependent on your specific backend design.