Authentication & Authorization

Implement JWT, OAuth, and RBAC authentication in NestJS with Passport.js.

1|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/daithang-organization/SE104_VLEAGUE --skill authentication-authorization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Authentication & Authorization
Source: https://github.com/daithang-organization/SE104_VLEAGUE/tree/main/.agent/skills/authentication-authorization
Command: npx skills add https://github.com/daithang-organization/SE104_VLEAGUE --skill authentication-authorization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides implementing secure authentication and authorization patterns in SE104_VLEAGUE, reducing risks from insecure passwords and misconfigured access control by outlining JWT, OAuth, and RBAC strategies.

Core Features & Use Cases

  • JWT-based authentication with access and refresh tokens for API security.
  • OAuth (Google) integration for third-party sign-in and user provisioning.
  • RBAC implementation with roles and guards to enforce access control.
  • Password security best practices and password validation rules.
  • Use case: securing an admin panel, protecting user endpoints, and enabling single sign-on for an enterprise team.

Quick Start

Start by configuring JWT secret and RBAC roles in your NestJS app, then implement a login flow that issues access and refresh tokens and apply route guards to protect admin endpoints.

Frequently Asked Questions about Authentication & Authorization

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

FAQPage Schema
How do I implement JWT authentication with access and refresh tokens in NestJS?

JWT authentication in NestJS involves configuring a JWT secret and implementing a login flow that issues access and refresh tokens. This skill provides concrete code patterns for token issuance, rotation, and route protection using Passport.js.

What's the best way to set up role-based access control (RBAC) for protected routes?

Setting up RBAC for protected routes requires defining user roles and applying route guards to enforce access control across backend endpoints. This skill outlines RBAC strategies with concrete configuration examples to secure admin panels and user endpoints.

How does Google OAuth integration work for third-party sign-in?

Google OAuth integration for third-party sign-in handles user provisioning through external authentication. This skill guides the OAuth integration process, enabling single sign-on for enterprise teams by connecting Google authentication with your backend user system.

Can I use Prisma with Passport.js for secure user authentication?

Yes, Prisma works with Passport.js for secure user authentication by managing user data and validating credentials. This skill provides configuration examples for NestJS, Prisma, and Passport.js to meet deployment-time security requirements.

What password hashing best practices should I apply for secure authentication?

Password hashing best practices for secure authentication require implementing proper password validation rules and secure hashing algorithms. This skill covers password security patterns to reduce risks from insecure passwords in your authentication system.

When do I need token rotation for JWT-based authentication?

Token rotation for JWT-based authentication is needed when implementing access and refresh tokens for API security. This skill guides token issuance and rotation strategies to maintain secure sessions and protect backend endpoints from unauthorized access.