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)