Tag in the user table when they are new and include it in the user session

This commit is contained in:
Keith Stevens
2023-01-14 18:55:28 +09:00
parent 90e71f3da2
commit b02429c1f7
5 changed files with 18 additions and 2 deletions
+4
View File
@@ -6,6 +6,8 @@ declare module "next-auth" {
user: {
/** The user's role. */
role: string;
/** True when the user is new. */
isNew: boolean;
} & DefaultSession["user"];
}
}
@@ -14,5 +16,7 @@ declare module "next-auth/jwt" {
interface JWT {
/** The user's role. */
role?: string;
/** True when the user is new. */
isNew?: boolean;
}
}