add: update type for next auth
This commit is contained in:
12
types/next-auth.d.ts
vendored
12
types/next-auth.d.ts
vendored
@@ -1,4 +1,5 @@
|
|||||||
import { DefaultSession } from "next-auth";
|
import { DefaultSession } from "next-auth";
|
||||||
|
import { DefaultJWT } from "next-auth/jwt";
|
||||||
|
|
||||||
declare module "next-auth" {
|
declare module "next-auth" {
|
||||||
interface Session extends DefaultSession {
|
interface Session extends DefaultSession {
|
||||||
@@ -9,6 +10,7 @@ declare module "next-auth" {
|
|||||||
email: string;
|
email: string;
|
||||||
image: string;
|
image: string;
|
||||||
};
|
};
|
||||||
|
error?: "RefreshAccessTokenError";
|
||||||
}
|
}
|
||||||
|
|
||||||
interface User {
|
interface User {
|
||||||
@@ -18,4 +20,14 @@ declare module "next-auth" {
|
|||||||
email: string;
|
email: string;
|
||||||
image: string;
|
image: string;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module "next-auth/jwt" {
|
||||||
|
interface JWT extends DefaultJWT {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
username: string;
|
||||||
|
email: string;
|
||||||
|
image: string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user