2022-11-11 22:17:44 -05:00
|
|
|
import { User } from "next-auth"
|
|
|
|
import { JWT } from "next-auth/jwt"
|
|
|
|
|
|
|
|
type UserId = string
|
|
|
|
|
|
|
|
declare module "next-auth/jwt" {
|
|
|
|
interface JWT {
|
|
|
|
id: UserId
|
|
|
|
role: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module "next-auth" {
|
|
|
|
interface Session {
|
|
|
|
user: User & {
|
|
|
|
id: UserId
|
|
|
|
role: string
|
|
|
|
}
|
|
|
|
}
|
2022-12-17 22:42:48 -05:00
|
|
|
|
|
|
|
// override user
|
|
|
|
interface User {
|
|
|
|
username?: string | null
|
|
|
|
email?: string | null
|
|
|
|
role?: string | null
|
|
|
|
id: UserId
|
|
|
|
}
|
2022-11-11 22:17:44 -05:00
|
|
|
}
|