fix: remove redirect

This commit is contained in:
karishmas6
2024-10-17 13:28:30 +05:30
parent 3ff7a4c417
commit 6c7bf385d0

View File

@@ -252,8 +252,6 @@ router.get('/google/callback', requireSignIn, async (req, res) => {
const jwtToken = jwt.sign({ userId: user.id }, process.env.JWT_SECRET as string, { expiresIn: '12h' });
res.cookie('token', jwtToken, { httpOnly: true });
res.redirect('http://localhost:3000');
res.json({
message: 'Google authentication successful',
google_sheet_email: robot.google_sheets_email,