From f31ace58455691effa1295e1185160926afd8770 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 19 Nov 2024 16:50:01 +0530 Subject: [PATCH] fix: use id to sign jwt token for google oauth callback --- server/src/routes/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index 96f4769a..ed495b8e 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -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 });