@mridang/nestjs-auth
Version:
A comprehensive Auth.js integration for NestJS applications with TypeScript support, framework-agnostic HTTP adapters, and role-based access control
21 lines (20 loc) • 772 B
TypeScript
import { AuthMiddleware } from './auth.middleware.js';
import type { Request as ExpressRequest, Response as ExpressResponse } from 'express';
import type { FastifyReply, FastifyRequest } from 'fastify';
/**
* Controller that handles all Auth.js routes.
* Delegates all requests to AuthMiddleware for processing.
*/
export declare class AuthController {
private readonly authMiddleware;
constructor(authMiddleware: AuthMiddleware);
/**
* Handles all Auth.js routes including
* - GET/POST /auth/signin
* - GET /auth/callback/:provider
* - POST /auth/signout
* - GET /auth/session
* - etc.
*/
handleAuthRoutes(req: ExpressRequest | FastifyRequest, res: ExpressResponse | FastifyReply, next: () => void): Promise<void>;
}