calendrier-avent/types/next-auth.d.ts

28 lines
639 B
TypeScript

import NextAuth, { DefaultSession, DefaultJWT, DefaultUser } from "next-auth";
import { JWT } from "next-auth/jwt";
declare module "next-auth" {
interface Session {
user: {
id: number;
firstName: string;
lastName: string
isTeacher: boolean;
} & DefaultSession["user"];
}
interface User {
id: number;
firstName: string;
lastName: string
isTeacher: boolean;
}
}
declare module "next-auth/jwt" {
interface JWT {
userId: number;
firstName: string;
lastName: string
isTeacher: boolean;
}
}