Add Path=/ to pointer cookie

This commit is contained in:
ekzyis 2023-11-21 05:19:16 +01:00
parent 260c97624b
commit 3bb24652b3
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ const AnonAccount = ({ selected, onClick }) => {
<AnonIcon
className='fill-muted'
width='135' height='135' style={{ cursor: 'pointer' }} onClick={async () => {
document.cookie = 'multi_auth.user-id=anonymous; Secure'
document.cookie = 'multi_auth.user-id=anonymous; Path=/; Secure'
// order is important to prevent flashes of no session
setIsAnon(true)
await refreshMe()
@ -100,7 +100,7 @@ const Account = ({ account, className }) => {
>
<Image
width='135' height='135' src={src} style={{ cursor: 'pointer' }} onClick={async () => {
document.cookie = `multi_auth.user-id=${account.id}; Secure`
document.cookie = `multi_auth.user-id=${account.id}; Path=/; Secure`
await refreshMe()
// order is important to prevent flashes of inconsistent data in switch account dialog
setIsAnon(false)