UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

20 lines (19 loc) 727 B
import { Route } from 'alinea/backend/router/Router'; import { Auth, Connection, User } from 'alinea/core'; import type { Transporter } from 'nodemailer'; export type PasswordLessAuthOptions = { dashboardUrl: string; subject: string; from: string; transporter: Transporter; jwtSecret: string; isUser: (email: string) => Promise<boolean>; }; export declare class PasswordLessAuth implements Auth.Server { protected options: PasswordLessAuthOptions; router: Route<Request, Response | undefined>; users: WeakMap<Request, User>; constructor(options: PasswordLessAuthOptions); contextFor(request: Request): Promise<Connection.AuthContext>; userFor(request: Request): Promise<User>; }