Files
mwitnessing/next-auth.d.ts
2024-02-22 04:19:38 +02:00

31 lines
746 B
TypeScript

// import { Role } from "@prisma/client";
// import { DefaultSession } from "next-auth";
// import { JWT } from "next-auth/jwt";
// Read more at: https://next-auth.js.org/getting-started/typescript#module-augmentation
declare module "next-auth/jwt" {
interface JWT {
/** The user's role. */
role?: Role;
userRole?: "admin"
}
}
// declare module "next-auth" {
// /**
// * Returned by `useSession`, `getSession` and received as a prop on the
// * `SessionProvider` React Context and trpc context
// */
// interface Session {
// user?: {
// role?: Role;
// } & DefaultSession["user"];
// }
// /** Passed as a parameter to the `jwt` callback */
// interface User {
// role?: Role;
// }
// }