first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:46:42 +03:00
commit 2a5b661443
202 changed files with 49770 additions and 0 deletions

47
frontend/types/next-auth.d.ts vendored Normal file
View File

@@ -0,0 +1,47 @@
import { DefaultSession } from "next-auth"
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
user: {
id: string
email: string
name: string
is_admin: boolean
username?: string
accessToken?: string // Added this line
} & DefaultSession["user"]
accessToken?: string
refreshToken?: string
roles?: string[]
error?: string
}
interface User {
id: string
email: string
username: string
is_admin: boolean
accessToken?: string
refreshToken?: string
roles?: string[]
accessTokenExpires?: number
}
}
declare module "next-auth/jwt" {
/** Returned by the `jwt` callback and `getToken`, when using JWT sessions */
interface JWT {
id?: string
email?: string
name?: string
is_admin?: boolean
accessToken?: string
refreshToken?: string
roles?: string[]
accessTokenExpires?: number
error?: string
}
}