diff --git a/src/utils.ts b/src/utils.ts index 01a0b8faa42..aa45c091286 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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 }