sarlink-portal/app/next-auth.d.ts
i701 9e2a2f430e
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 3m14s
refactor: update payment types and user interface, enhance error handling, and adjust API base URL
2025-04-05 23:25:17 +05:00

30 lines
721 B
TypeScript

import NextAuth, { DefaultSession, type User } from "next-auth";
import { Session } from "next-auth";
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
apiToken?: string;
name?: string | null;
email?: string | null;
image?: string | null;
user?: User & {
expiry?: string;
id?: number;
username?: string;
user_permissions?: { id: number; name: string }[];
id_card?: string;
mobile?: string;
wallet_balance?: number;
first_name?: string;
last_name?: string;
last_login?: string;
date_joined?: string;
is_superuser?: boolean;
};
expires: ISODateString;
}
}