From 0caa517cd577ff895e6fa30e52bf15a4dc52d06d Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 21 Nov 2023 02:55:33 +0100 Subject: [PATCH] Use secure cookie --- components/switch-account.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/switch-account.js b/components/switch-account.js index 93a5303d..52c458e4 100644 --- a/components/switch-account.js +++ b/components/switch-account.js @@ -61,7 +61,7 @@ const AnonAccount = ({ selected, onClick }) => { { - document.cookie = 'multi_auth.user-id=anonymous' + document.cookie = 'multi_auth.user-id=anonymous; Secure' // order is important to prevent flashes of no session setIsAnon(true) await refreshMe() @@ -97,7 +97,7 @@ const Account = ({ account, className }) => { > { - document.cookie = `multi_auth.user-id=${account.id}` + document.cookie = `multi_auth.user-id=${account.id}; Secure` await refreshMe() // order is important to prevent flashes of inconsistent data in switch account dialog setIsAnon(false)