Skip to content

Commit

Permalink
Add Path=/ to pointer cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Nov 21, 2023
1 parent c33203a commit b7c59a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/switch-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b7c59a1

Please sign in to comment.