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,

15 lines (14 loc) 721 B
import { FacebookProfileType, GoogleProfileType, NestAuthInterface } from "./nestauth.interface"; import { JwtService } from "@nestjs/jwt"; import { StringValue } from "ms"; export declare class NestAuthService { private jwtService; readonly userService: NestAuthInterface; private readonly jwtExpiresIn; private readonly jwtRefreshTokenExpiresIn; constructor(jwtService: JwtService, userService: NestAuthInterface, jwtExpiresIn?: StringValue | number, jwtRefreshTokenExpiresIn?: StringValue | number); login(user: any): Promise<any>; google(user: GoogleProfileType): Promise<any>; facebook(user: FacebookProfileType): Promise<any>; refreshToken(refreshToken: string): Promise<any>; }