UNPKG

next-password

Version:

Use password to protect your Next.js application.

12 lines (11 loc) 481 B
import { NextRequest, NextResponse } from 'next/server'; export declare type NextPasswordOptions = { password?: string; maxAge?: number; authComponentName?: string; exactMatch?: boolean; logoutPath?: string; salt?: string; }; export declare const defaultOptions: Required<NextPasswordOptions>; export declare const initPasswordMiddleware: (path?: string | string[], options?: NextPasswordOptions) => (req: NextRequest) => Promise<NextResponse | undefined>;