add: update type for next auth

This commit is contained in:
Elie Baier 2024-03-24 03:22:18 +01:00
parent 4ec999d3a7
commit 4e62e5f00b
1 changed files with 12 additions and 0 deletions

12
types/next-auth.d.ts vendored
View File

@ -1,4 +1,5 @@
import { DefaultSession } from "next-auth";
import { DefaultJWT } from "next-auth/jwt";
declare module "next-auth" {
interface Session extends DefaultSession {
@ -9,6 +10,7 @@ declare module "next-auth" {
email: string;
image: string;
};
error?: "RefreshAccessTokenError";
}
interface User {
@ -18,4 +20,14 @@ declare module "next-auth" {
email: string;
image: string;
}
}
declare module "next-auth/jwt" {
interface JWT extends DefaultJWT {
id: string;
name: string;
username: string;
email: string;
image: string;
}
}