Skip to main content

Modules & Guards

AuthModule

  • Bundles login strategies, JWT validation, and shared providers
  • Import in your Nest app to enable authentication helpers

Guards

GuardDescription
JwtAuthGuardValidates bearer JWT and populates AuthUser
Capability/role guardsUsed in Access Control backend to enforce feature permissions

Types

TypeDescription
AuthUserSurface used by guards and services; includes optional mfaEnabled

Example

import { JwtAuthGuard } from '@digiwedge/auth';

@UseGuards(JwtAuthGuard)
@Get('/me')
getProfile(@Req() req) {
return req.user;
}