feat: Implement user authentication using NextAuth with social and credentials providers.
This commit is contained in:
1 parent
b1cd8376ac
commit
218337666e
8 files changed
+452
-3
No files matched your search
Vendored
+27
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user