14
src/types/next-auth.d.ts
vendored
Normal file
14
src/types/next-auth.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { DefaultSession } from "next-auth";
|
||||
|
||||
declare module "next-auth" {
|
||||
interface Session {
|
||||
user: DefaultSession["user"] & { id: string; role: "USER" | "ADMIN" };
|
||||
}
|
||||
}
|
||||
|
||||
declare module "next-auth/jwt" {
|
||||
interface JWT {
|
||||
id?: string;
|
||||
role?: "USER" | "ADMIN";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user