
Auth Implementation Patterns
This walks you through the messy realities of auth implementation with actual code patterns for JWT refresh flows, session management with Redis, OAuth2 integration, and RBAC systems. It covers the gotchas like token storage, logout mechanics, and permission checking that trip up most implementations. Use it when you're building login systems from scratch, debugging why tokens aren't refreshing properly, or trying to figure out the right auth strategy for your API. The examples are production-ready with proper error handling and security considerations baked in.
- skills.sh installs
- 20.9K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill auth-implementation-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Authentication & Authorization Implementation Patterns
Build secure, scalable authentication and authorization systems using industry-standard patterns and modern best practices.
When to Use This Skill
- Implementing user authentication systems
- Securing REST or GraphQL APIs
- Adding OAuth2/social login
- Implementing role-based access control (RBAC)
- Designing session management
- Migrating authentication systems
- Debugging auth issues
- Implementing SSO or multi-tenancy
Core Concepts
1. Authentication vs Authorization
Authentication (AuthN): Who are you?
- Verifying identity (username/password, OAuth, biometrics)
- Issuing credentials (sessions, tokens)
- Managing login/logout
Authorization (AuthZ): What can you do?
- Permission checking
- Role-based access control (RBAC)
- Resource ownership validation
- Policy enforcement
2. Authentication Strategies
Session-Based:
- Server stores session state
- Session ID in cookie
- Traditional, simple, stateful
Token-Based (JWT):
- Stateless, self-contained
- Scales horizontally
- Can store claims
OAuth2/OpenID Connect:
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Categories
- Backend & APIs, Security, DevOps & CI/CD, Debugging
More from wshobson/agents
All 174- Sql Optimization Patterns20.4K
- Git Advanced Workflows19.9K
- Dotnet Backend Patterns19.6K
- Async Python Patterns18.8K
- Attack Tree Construction18.8K
- Godot Gdscript Patterns18.3K
- Github Actions Templates18.1K
- Database Migration18K
- Data Storytelling17.6K
- Backtesting Frameworks17.5K
- Kpi Dashboard Design17.2K
- Python Code Style17.1K
- Openapi Spec Generation17K
- Interaction Design17K
- Design System Patterns16.7K
- Terraform Module Library16.1K
- React Native Design16.1K
- React State Management15.9K
- Solidity Security15.8K
- Uv Package Manager15.7K
- React Native Architecture15.6K
- Gdpr Data Handling15.4K
- Python Project Structure15.4K
- Accessibility Compliance15.2K