sarlink-portal/next-auth.d.ts

20 lines
467 B
TypeScript

import NextAuth, { DefaultSession } from "next-auth";
import { Session } from "next-auth";
import type { User } from "./userTypes";
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
apiToken?: string;
name?: string | null;
email?: string | null;
image?: string | null;
user?: User & {
expiry?: string;
};
expires: ISODateString;
}
}