el.xwx.moe/types/next-auth.d.ts

45 lines
819 B
TypeScript
Raw Normal View History

2023-07-08 05:35:43 -05:00
import NextAuth from "next-auth";
2023-11-02 00:52:49 -05:00
import { JWT } from "next-auth/jwt";
2023-02-08 15:11:33 -06:00
declare module "next-auth" {
interface Session {
user: {
id: number;
2023-07-08 05:35:43 -05:00
username: string;
email: string;
isSubscriber: boolean;
2023-07-08 05:35:43 -05:00
};
2023-02-08 15:11:33 -06:00
}
2023-11-02 00:52:49 -05:00
interface User {
id: number;
name: string;
username: string;
email: string;
emailVerified: Date;
image: string;
password: string;
archiveAsScreenshot: boolean;
archiveAsPDF: boolean;
archiveAsWaybackMachine: boolean;
isPrivate: boolean;
createdAt: Date;
updatedAt: Date;
}
}
declare module "next-auth/jwt" {
interface JWT {
name: string;
email: string;
picture: string;
sub: string;
isSubscriber: boolean;
id: number;
username: string;
iat: number;
exp: number;
jti: string;
}
2023-02-08 15:11:33 -06:00
}