From 37c39bd336cc6cb8b29c633ac7ae972272f47016 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Tue, 10 Sep 2024 14:27:57 +0200 Subject: [PATCH] Remove cookie fix for prod. env. --- src/stores/game.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/stores/game.ts b/src/stores/game.ts index 3ed1137..5c5af9e 100644 --- a/src/stores/game.ts +++ b/src/stores/game.ts @@ -64,8 +64,11 @@ export const useGameStore = defineStore('game', { disconnectSocket() { if (this.connection) this.connection.disconnect() - useCookies().remove('token') - + useCookies().remove('token', { + // for whole domain + domain: window.location.hostname.split('.').slice(-2).join('.') + }) + this.connection = null this.token = null this.user = null