mirror of https://github.com/MaxLeiter/Drift
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
643 B
TypeScript
34 lines
643 B
TypeScript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
import type { User } from "next-auth"
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
import type { JWT } from "next-auth/jwt"
|
|
|
|
type UserId = string
|
|
|
|
declare module "next-auth/jwt" {
|
|
interface JWT {
|
|
id: UserId
|
|
role: string
|
|
sessionToken: string
|
|
}
|
|
}
|
|
|
|
declare module "next-auth" {
|
|
interface Session {
|
|
user: User & {
|
|
id: UserId
|
|
role: string
|
|
sessionToken: string
|
|
}
|
|
}
|
|
|
|
// override user
|
|
interface User {
|
|
username?: string | null
|
|
email?: string | null
|
|
role?: string | null
|
|
id: UserId
|
|
token?: string
|
|
}
|
|
}
|