From 4e62e5f00b9d47a3ce7763682b198160c27f8b85 Mon Sep 17 00:00:00 2001 From: Fayorg Date: Sun, 24 Mar 2024 03:22:18 +0100 Subject: [PATCH] add: update type for next auth --- types/next-auth.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/next-auth.d.ts b/types/next-auth.d.ts index 690635a..90302da 100644 --- a/types/next-auth.d.ts +++ b/types/next-auth.d.ts @@ -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; + } } \ No newline at end of file