Files
Open-Assistant/website/types/next-auth.d.ts
T
AbdBarho 86eac87c19 Add ToS/License Agreement to Website (#1080)
* add new apis to oasst client

* add tos handler

* Add ToS to Dashboard

* use Provider for ToS

* simplify provider

* fix error

* Inject into JWT

* primitive error handling

* update comment

* address review
2023-02-03 20:53:20 +01:00

27 lines
685 B
TypeScript

import NextAuth, { DefaultSession } from "next-auth";
import { JWT } from "next-auth/jwt";
declare module "next-auth" {
interface Session {
user: {
/** The user's role. */
role: string;
/** True when the user is new. */
isNew: boolean;
/** Iso timestamp of the user's acceptance of the terms of service */
tosAcceptanceDate?: string;
} & DefaultSession["user"];
}
}
declare module "next-auth/jwt" {
interface JWT {
/** The user's role. */
role?: string;
/** True when the user is new. */
isNew?: boolean;
/** Iso timestamp of the user's acceptance of the terms of service */
tosAcceptanceDate?: string;
}
}