NestJS GrpcAuthGuard

JSON →
library 0.1.3 ·javascript
verified Jun 7, 2026

GrpcAuthGuard is an agnostic guard for NestJS optimized for gRPC scope, allowing injection of a custom authentication service that implements the IAuthService interface. It reads tokens from gRPC metadata and provides a @GRPCUser() decorator to inject the authenticated user into controller methods. Current version is 0.1.3 (beta). The library is minimal and tightly coupled to NestJS's gRPC microservices, offering a straightforward pattern for token validation (e.g., JWT) without opinionated defaults. Compared to other NestJS guards, this one is purpose-built for gRPC and metadata-based auth.