webdev-service / types /next-auth.d.ts
underrate's picture
Initial commit
34ed5b1 verified
Raw
History Blame Contribute Delete
550 Bytes
import NextAuth, { DefaultSession } from "next-auth"
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
user: {
/** The user's role. */
role: string
id: string
} & DefaultSession["user"]
}
interface User {
role: string
}
}
declare module "next-auth/jwt" {
interface JWT {
role: string
id: string
}
}