From a8750afa7e77946abd390e59f0566c0dba1836dd Mon Sep 17 00:00:00 2001 From: Sorrel Bri Date: Sat, 18 Jan 2020 23:53:42 -0800 Subject: [PATCH] patch https cookies in production --- packages/play-node-go/server/services/signToken.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/play-node-go/server/services/signToken.js b/packages/play-node-go/server/services/signToken.js index f7260a3..588b730 100644 --- a/packages/play-node-go/server/services/signToken.js +++ b/packages/play-node-go/server/services/signToken.js @@ -13,9 +13,9 @@ const signToken = (res, user) => { return res.cookie('token', token, { expires: new Date(Date.now() + expiration), domain: process.env.DOMAIN, - // secure: false, // set to true if your using https - httpOnly: true - // path: '/api/v1' + secure: process.env.NODE_ENV === 'production' ? true : false, + httpOnly: true, + sameSite: 'Strict' }); }; module.exports = signToken; \ No newline at end of file