Auth Library (libs/auth)
The shared authentication library for NestJS apps. Exposes the AuthModule, common guards (e.g., JwtAuthGuard), and helpers for MFA and notification workflows.
Quick Start
import { AuthModule, JwtAuthGuard } from '@digiwedge/auth';
import { Module, Controller, Get, UseGuards } from '@nestjs/common';
@Module({ imports: [AuthModule] })
export class AppModule {}
@Controller('protected')
@UseGuards(JwtAuthGuard)
export class ProtectedController {
@Get()
get() {
return 'ok';
}
}
Package Info
| Item | Value |
|---|---|
| Package | @digiwedge/auth |
| Source | libs/auth |
| Tests | pnpm nx run auth:test:unit |
Contents
- Modules & Guards — AuthModule and JwtAuthGuard
- MFA — MFA integration helpers
- Notifications — PreferenceAwareNotifier
- Configuration — Environment variables
- Troubleshooting — Common issues