chore: Remove beta cookie when removing main domain cookie
This commit is contained in:
parent
3c4e56db2d
commit
5983c77a67
|
@ -281,6 +281,10 @@ export function setCookie(cName: string, cValue: string): void {
|
|||
}
|
||||
|
||||
export function removeCookie(cName: string): void {
|
||||
if (isBeta) {
|
||||
document.cookie = `${cName}=;Secure;SameSite=Strict;Domain=pokerogue.net;Path=/;Max-Age=-1`; // we need to remove the cookie from the main domain as well
|
||||
}
|
||||
|
||||
document.cookie = `${cName}=;Secure;SameSite=Strict;Domain=${window.location.hostname};Path=/;Max-Age=-1`;
|
||||
document.cookie = `${cName}=;Secure;SameSite=Strict;Path=/;Max-Age=-1`; // legacy cookie without domain, for older cookies to prevent a login loop
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue