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; } }