Files
Open-Assistant/website/types/next-auth.d.ts
T

23 lines
469 B
TypeScript

import NextAuth, { DefaultSession } from "next-auth";
import { JWT } from "next-auth/jwt";
declare module "next-auth" {
interface Session {
user: {
/** The user's role. */
role: string;
/** True when the user is new. */
isNew: boolean;
} & DefaultSession["user"];
}
}
declare module "next-auth/jwt" {
interface JWT {
/** The user's role. */
role?: string;
/** True when the user is new. */
isNew?: boolean;
}
}