From 1f42a0f66179190d94d9006a27a225233ad40d06 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Mon, 4 Oct 2021 20:51:28 +0530 Subject: [PATCH] Add secure: true --- app/javascript/dashboard/store/utils/api.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/dashboard/store/utils/api.js b/app/javascript/dashboard/store/utils/api.js index 388af5884..8a8a013bb 100644 --- a/app/javascript/dashboard/store/utils/api.js +++ b/app/javascript/dashboard/store/utils/api.js @@ -24,7 +24,8 @@ export const setUser = (user, expiryDate, options = {}) => { } Cookies.set('user', user, { expires: differenceInDays(expiryDate, new Date()), - sameSite: 'Lax', + sameSite: 'None', + secure: true, }); }; @@ -35,7 +36,8 @@ export const setAuthCredentials = response => { const expiryDate = getHeaderExpiry(response); Cookies.set('auth_data', response.headers, { expires: differenceInDays(expiryDate, new Date()), - sameSite: 'Lax', + sameSite: 'None', + secure: true, }); setUser(response.data.data, expiryDate); };