Files
Calbook/types/next-auth.d.ts

28 lines
429 B
TypeScript

import NextAuth from "next-auth";
declare module "next-auth" {
interface Session {
user: {
id: string;
role: "ADMIN" | "STAFF";
slug: string;
name: string;
email: string;
};
}
interface User {
id: string;
role: "ADMIN" | "STAFF";
slug: string;
}
}
declare module "next-auth/jwt" {
interface JWT {
id: string;
role: "ADMIN" | "STAFF";
slug: string;
}
}