dabydat/alpha-omega/nestjs-authentication-oidc
Claude Code and agent skill by dabydat/alpha-omega
- community
Checking that the SKILL.md file is still in the repository.
OIDC/PKCE/JWKS authentication patterns for NestJS. Covers OAuth2 flows, token validation, password hashing, and identity provider integration. Use when implementing OAuth authentication, OIDC flows, password hashing, or identity integration.
Install
npx vskill@latest install dabydat/alpha-omega/nestjs-authentication-oidcSKILL.md
NestJS OIDC/PKCE Authentication
Why OIDC + PKCE
See references/why-oidc.md for the ❌ BAD custom-token-auth example, the ✅ OIDC + PKCE solution, and the flow overview diagram.
JWKS Key Generation
See references/jwks-generation.md for key types, rotation strategy, loading patterns, and the generator.
OIDC Provider Service
See references/oidc-provider.md for the full provider implementation, endpoint handling, and the custom /me endpoint.
OIDC handles: /authorize, /token, /userinfo, /.well-known/openid-configuration, /logout.
OIDC Controller
See references/oidc-controller.md for the logout + mounted OIDC endpoints.
Authorization Code Flow
Interaction Controller (Login/OTP Screens)
See references/interaction-controller.md for the full prompt handling (login/consent/OTP).
Custom UserInfo Endpoint
See references/oidc-provider.md for the /me handler implementation.
Password Hashing
See references/password-hashing.md for PBKDF2 implementation, migration patterns, and the HASHING_SERVICE port.
When to Use Which Algorithm
| Algorithm | Use Case | Notes | |
|---|---|---|---|
| PBKDF2 | Enterprise migration, compliance | 15000+ iterations | |
| bcrypt | General purpose | Auto salt, work factor tuning | |
| argon2 | New systems, high security | Memory-hard |
Recommendation: For new systems, prefer argon2. For migration or compliance, PBKDF2.
Token Validation in Resource Servers
See references/resource-server-validation.md for JWKS validation, introspection, and the JwtAuthGuard.
Service Communication Patterns
See references/service-communication.md for TCP vs REST patterns and correlation ID propagation.
TCP vs REST for Auth Services
| Aspect | TCP | REST | |
|---|---|---|---|
| Latency | Lower | Higher | |
| Client support | NestJS only | Any HTTP client | |
| Type safety | MessagePattern | DTOs |
Anti-Patterns to Avoid
See references/anti-patterns.md for the four ❌ examples (localStorage, no PKCE, no revoke, timing attacks) with fixes.
Summary: Auth Flow Responsibilities
| Component | Responsibility | |
|---|---|---|
| JWKS Generator | Create RSA/ECDSA/EdDSA key pairs for signing | |
| OIDC Provider | Handle auth endpoint, token exchange, discovery | |
| Hashing Service | PBKDF2/bcrypt/argon2 password hashing | |
| Interaction Controller | Login form, consent screen, OTP verification | |
| Token Repository | Store access/refresh tokens with rotation | |
| Auth Guard | Validate JWTs using JWKS | |
| /me Endpoint | Return user claims |
Golden rules:
- Never store tokens insecurely. Use httpOnly cookies or secure storage.
- Always use PKCE for public clients.
- Use timing-safe comparison for hash verification.
- Resource servers validate tokens using shared JWKS or introspection.
Related Skills
nestjs-guards-filters- Guards and exception filters for auth handlingnestjs-controllers- Controller patterns for API gatewaysnestjs-ddd-patterns- DomainException base class
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nestjs/nestjs-authentication-oidc/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-authentication-oidc)