21 lines
300 B
TypeScript
21 lines
300 B
TypeScript
|
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
|
||
|
}
|
||
|
}
|
||
|
}
|