fix: use id to sign jwt token for google oauth callback

This commit is contained in:
amhsirak
2024-11-19 16:50:01 +05:30
parent 462675bdfe
commit f31ace5845

View File

@@ -366,7 +366,7 @@ router.get(
// Generate JWT token for session
const jwtToken = jwt.sign(
{ userId: user.id },
{ id: user.id },
process.env.JWT_SECRET as string
);
res.cookie("token", jwtToken, { httpOnly: true });