@ps-dev/auth-core
A reusable NestJS authentication package with RBAC foundation, JWT handling, async processing workflows, and Dead Letter Queue (DLQ) integration — built for plug-and-play use across NestJS microservices.
downloadQuick Start
architectureArchitecture Decisions
RBAC over simple role checks
Implemented a full Role-Based Access Control foundation rather than ad-hoc role flags. This allows fine-grained permission management per resource and action, making the package reusable across different services with distinct permission structures without code changes.
Dead Letter Queue for async reliability
Integrated DLQ handling for async processing workflows ensures that failed authentication events (e.g., token revocation notifications, audit log writes) are never silently dropped. Failed messages are retried or routed for manual inspection, critical for audit compliance in financial systems.
Modular NestJS Design
The package is structured as a NestJS dynamic module, so it can be imported with configuration options and integrated cleanly into any existing NestJS application without coupling to a specific database or caching strategy.
featured_play_listKey Features
import { AuthCoreModule } from '@ps-dev/auth-core'; @Module({ // Register the auth module with your config imports: [ AuthCoreModule.forRoot({ secret: process.env.JWT_SECRET, rbac: { roles: ['admin', 'user', 'viewer'], enableDlq: true, }, }), ], }) export class AppModule {}