feat: Implement user authentication using NextAuth with social and credentials providers.

This commit is contained in:
pradeepkumar committed 2025-12-20 19:22:35 +05:30
1 parent b1cd8376ac
commit 218337666e
8 files changed
+452 -3

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { DefaultSession, DefaultUser } from "next-auth";
declare module "next-auth" {
interface Session {
user: {
id: string;
role: "USER" | "AGENT" | "ADMIN";
accessToken: string;
refreshToken: string;
} & DefaultSession["user"];
}
interface User extends DefaultUser {
role: "USER" | "AGENT" | "ADMIN";
accessToken: string;
refreshToken: string;
}
}
declare module "next-auth/jwt" {
interface JWT {
id: string;
role: "USER" | "AGENT" | "ADMIN";
accessToken: string;
refreshToken: string;
}
}