UNPKG

@next-nest-auth/nestauth

Version:

NestAuth is an authentication solution for NestJS applications, designed to handle user login, session management, and token-based authentication (JWT). It integrates seamlessly with Next.js and other frontends to provide a unified authentication system,

13 lines (9 loc) 357 B
import { Injectable } from "@nestjs/common"; import { AuthGuard } from "@nestjs/passport"; // @Injectable() // export class NestAuthLocalGuard extends AuthGuard("nestauth-local") {} export function createLocalGuard(strategyName: string) { @Injectable() class NestAuthLocalGuard extends AuthGuard(strategyName) {} return NestAuthLocalGuard; }