Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Backend & APIs
wshobson avatar

Auth Implementation Patterns

wshobson/agents

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.

installs
19.7K
GitHub stars
41.8K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add wshobson/agents --skill auth-implementation-patterns --agent claude-code

Installs 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:

  • Delegate authentication
  • Social login (Google, GitHub)
  • Enterprise SSO

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Never Store Plain Passwords: Always hash with bcrypt/argon2
  2. Use HTTPS: Encrypt data in transit
  3. Short-Lived Access Tokens: 15-30 minutes max
  4. Secure Cookies: httpOnly, secure, sameSite flags
  5. Validate All Input: Email format, password strength
  6. Rate Limit Auth Endpoints: Prevent brute force attacks
  7. Implement CSRF Protection: For session-based auth
  8. Rotate Secrets Regularly: JWT secrets, session secrets
  9. Log Security Events: Login attempts, failed auth
  10. Use MFA When Possible: Extra security layer

Common Pitfalls

  • Weak Passwords: Enforce strong password policies
  • JWT in localStorage: Vulnerable to XSS, use httpOnly cookies
  • No Token Expiration: Tokens should expire
  • Client-Side Auth Checks Only: Always validate server-side
  • Insecure Password Reset: Use secure tokens with expiration
  • No Rate Limiting: Vulnerable to brute force
  • Trusting Client Data: Always validate on server
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/wshobson/agents
Categories
Backend & APIs, Security, DevOps & CI/CD, Debugging

More from wshobson/agents

All 174
  • Git Advanced Workflows19.5K
  • Dotnet Backend Patterns19.2K
  • Async Python Patterns18.2K
  • Attack Tree Construction17.7K
  • Database Migration17.6K
  • Github Actions Templates17.6K
  • Godot Gdscript Patterns17.6K
  • Data Storytelling17K
  • Backtesting Frameworks16.9K
  • Python Code Style16.6K
  • Openapi Spec Generation16.5K
  • Kpi Dashboard Design16.3K
  • Interaction Design16.3K
  • Design System Patterns16.1K
  • Terraform Module Library15.7K
  • React Native Design15.6K
  • Solidity Security15.5K
  • React State Management15.4K
  • Uv Package Manager15.3K
  • React Native Architecture15.2K
  • Gdpr Data Handling15K
  • Python Project Structure14.9K
  • K8s Security Policies14.8K
  • Accessibility Compliance14.7K

Recommended

More Backend & APIs
1wshobson avatardotnet-backend-patternswshobson/agentsMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity19.2Kinstalls
2google avatargemini-interactions-apigoogle/skillsGuides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API fo10.6Kinstalls
3google avatargemini-agents-apigoogle/skillsManages custom Agent resources on Gemini Enterprise Agent Platform. Use when the user wants to programmatically create, configure, list, update, or delete state9.6Kinstalls
4google avatargoogle-analytics-admin-api-basicsgoogle/skillsManages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists accounts and properties, and manages data strea7.2Kinstalls
5payloadcms avatarpayloadpayloadcms/skillsUse when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, secur6.9Kinstalls
6jeffallan avatarwebsocket-engineerjeffallan/claude-skillsUse when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence trac6.8Kinstalls