@happykit/auth-email
Version:
- A `useAuth` hook which returns the current user - An optional `getServerSideAuth` for server-side rendering - HappyAuth is tiny - it adds only 4.6 kB to the first load JS - it adds less than 0.04 kB if you're transitioning from another page - Extremely
9 lines (8 loc) • 393 B
TypeScript
import { NextApiRequest, NextApiResponse } from "next";
import { AuthRouteHandlerOptions } from ".";
import { Token } from "simple-oauth2";
export declare type FetchAdditionalTokenContent = (options: {
userId: string;
oauthToken?: Token;
}) => object;
export declare function createLogin(options: AuthRouteHandlerOptions): (req: NextApiRequest, res: NextApiResponse) => Promise<void>;