From 8fdbaf4499d384b6afd94f6b14c139a2851fb25d Mon Sep 17 00:00:00 2001 From: sam365724 <111515092+sam365724@users.noreply.github.com> Date: Wed, 2 Nov 2022 19:32:30 +0100 Subject: [PATCH] Fix workaround for broken logout (#836) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use hostname without port for setting empty cookie, avoids error in browser: Cookie “jwt” has been rejected for invalid domain. --- src/shared/services/UserService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/services/UserService.ts b/src/shared/services/UserService.ts index 8d591cc..b97d506 100644 --- a/src/shared/services/UserService.ts +++ b/src/shared/services/UserService.ts @@ -52,7 +52,7 @@ export class UserService { this.jwtInfo = None; this.myUserInfo = None; IsomorphicCookie.remove("jwt"); // TODO is sometimes unreliable for some reason - document.cookie = "jwt=; Max-Age=0; path=/; domain=" + location.host; + document.cookie = "jwt=; Max-Age=0; path=/; domain=" + location.hostname; location.reload(); } -- 2.44.1