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