member-module

Implement NestJS member management with JWT, OAuth2, and Casbin RBAC/ABAC.

6|3|Updated Apr 8, 2022
One-click install
npx skills add https://github.com/Rytass/Utils --skill member-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: member-module
Source: https://github.com/Rytass/Utils/tree/main/.claude/skills/member-module
Command: npx skills add https://github.com/Rytass/Utils --skill member-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Member module provides a complete, configurable user authentication and authorization system for NestJS applications, eliminating boilerplate and accelerating secure onboarding.

Core Features & Use Cases

  • JWT-based authentication with token lifecycles
  • OAuth2 integration (Google/Facebook) and custom providers
  • RBAC/ABAC permissions with Casbin and domain support
  • Password policy enforcement and admin tooling for member management
  • Quick customization: replace the base member entity and plug in your own payload

Quick Start

Install the module and configure it in your NestJS AppModule:

  • Install: npm install @rytass/member-base-nestjs-module
  • Import and configure: MemberBaseModule.forRoot({ ... }) in AppModule
  • Optional: customize member entity and JWT payload via provided options.

Frequently Asked Questions about member-module

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

FAQPage Schema
How do I implement JWT authentication and RBAC in a NestJS application?

You can implement JWT authentication and RBAC in NestJS by configuring a dedicated member module that handles token signing, token lifecycles, and Casbin-based permission policies. This eliminates boilerplate for secure user onboarding.

Can I integrate OAuth2 providers like Google and Facebook with NestJS member systems?

Yes, NestJS member systems can integrate OAuth2 providers like Google and Facebook. The module supports plugging in custom OAuth2 providers to streamline external authentication flows alongside standard JWT login.

How do I enforce password policies in a NestJS user management module?

You enforce password policies in a NestJS user management module by utilizing built-in password validation features. This ensures compliance during user registration and updates within the admin tooling for member management.

How do I customize the user entity and JWT payload in a NestJS authentication module?

You can customize the user entity and JWT payload in a NestJS authentication module by passing custom classes and payload shapes through the module's configuration options during initialization.

Does Casbin RBAC support domain-level permissions for NestJS backend services?

Yes, Casbin RBAC supports domain-level permissions for NestJS backend services. The module implements RBAC and ABAC permissions with domain support, allowing granular access control across different application domains.

What is the best way to set up a secure NestJS member management system quickly?

The best way to set up a secure NestJS member management system is using a configurable module that bundles JWT authentication, OAuth2 integration, Casbin RBAC, and password policies, eliminating boilerplate and accelerating secure onboarding.