From 0406b972552886517fe73fad0a7a454217f42e84 Mon Sep 17 00:00:00 2001 From: Dhruv Jain Date: Sat, 20 Mar 2021 15:21:19 +0530 Subject: [PATCH] [FIX] Chrome, Brave, and IE iframe login failure due to cookies restriction --- client/src/components/Login/index.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/client/src/components/Login/index.js b/client/src/components/Login/index.js index 21da656..79460a5 100644 --- a/client/src/components/Login/index.js +++ b/client/src/components/Login/index.js @@ -38,9 +38,18 @@ export default function Login(props) { }) .then((response) => response.json()) .then((data) => { - Cookies.set("rc_token", data.data.rc_token); - Cookies.set("rc_uid", data.data.rc_uid); - Cookies.set("rc4git_token", data.data.rc4git_token); + Cookies.set("rc_token", data.data.rc_token, { + sameSite: "None", + secure: true, + }); + Cookies.set("rc_uid", data.data.rc_uid, { + sameSite: "None", + secure: true, + }); + Cookies.set("rc4git_token", data.data.rc4git_token, { + sameSite: "None", + secure: true, + }); Cookies.set("gh_login_token", data.data.gh_login_token); setAuthState({ user: jwt_decode(data.data.rc4git_token),