UNPKG

next-auth

Version:

Authentication for Next.js

20 lines (19 loc) 973 B
import { NextAuthOptions } from "../.."; import { InternalOptions } from "../../lib/types"; import { InternalUrl } from "../../lib/parse-url"; /** * Takes a number in seconds and returns the date in the future. * Optionally takes a second date parameter. In that case * the date in the future will be calculated from that date instead of now. */ export declare function fromDate(time: number, date?: number): Date; export declare function hashToken(token: string, options: InternalOptions<"email">): string; /** * Secret used salt cookies and tokens (e.g. for CSRF protection). * If no secret option is specified then it creates one on the fly * based on options passed here. If options contains unique data, such as * OAuth provider secrets and database credentials it should be sufficent. If no secret provided in production, we throw an error. */ export default function createSecret(params: { userOptions: NextAuthOptions; url: InternalUrl; }): string;