Skip to content

Commit

Permalink
undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir224 committed Oct 9, 2023
1 parent b5fa46e commit 586e76a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const googleAuth=async(req,res,next)=>{
res
.cookie("access_token",token,{ //to send the access token to the client
//to use cookies, we import the cookie-parser
httpOnly:false //this will make our application more secure such that third party scripts will not be able to use our cookie
httpOnly:true //this will make our application more secure such that third party scripts will not be able to use our cookie
})
.status(200)
.json(user._doc);
Expand All @@ -66,7 +66,7 @@ export const googleAuth=async(req,res,next)=>{
const token=jwt.sign({id:savedUser._id},process.env.JWT)
res
.cookie("access_token",token,{
httpOnly:false
httpOnly:true
})
.status(200)
.json(savedUser._doc);
Expand Down

0 comments on commit 586e76a

Please sign in to comment.