Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/limit cookie clearance in sign-out logic (#8350)

Thomas Kaul6ddb36ae7549
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 61c96bb299..e717975ff7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Upgraded `uuid` from version `14.0.2` to `14.0.3`
- Upgraded `yahoo-finance2` from version `4.0.2` to `4.0.5`
+### Fixed
+
+- Fixed the sign-out logic which deleted all cookies of the origin and did not delete the _Bull Board_ cookie on plain HTTP
+
## 3.94.0 - 2026-10-28
### Changed
diff --git a/apps/client/src/app/services/user/user.service.ts b/apps/client/src/app/services/user/user.service.ts
index 12e34c330b..ebc3a5fb96 100644
--- a/apps/client/src/app/services/user/user.service.ts
+++ b/apps/client/src/app/services/user/user.service.ts
@@ -1,5 +1,6 @@
import { KEY_SUBSCRIPTION_INTERSTITIAL_SHOWN } from '@ghostfolio/client/services/settings-storage.service';
import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service';
+import { BULL_BOARD_COOKIE_NAME } from '@ghostfolio/common/config';
import { Filter, User } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
@@ -109,7 +110,7 @@ export class UserService extends ObservableStore<UserStoreState> {
window.localStorage.clear();
window.sessionStorage.clear();
- void this.clearAllCookies();
+ this.clearBullBoardCookie();
this.reset();
@@ -118,27 +119,8 @@ export class UserService extends ObservableStore<UserStoreState> {
}
}
- private async clearAllCookies() {
- if (!('cookieStore' in window)) {
- console.warn('Cookie Store API not available in this browser');
- return;
- }
-
- const cookies = await cookieStore.getAll();
-
- const cookieNames = cookies
- .map(({ name }) => {
- return name;
- })
- .filter((name): name is string => {
- return !!name;
- });
-
- await Promise.all(
- cookieNames.map((name) => {
- return cookieStore.delete(name);
- })
- );
+ private clearBullBoardCookie() {
+ document.cookie = `${BULL_BOARD_COOKIE_NAME}=; Max-Age=0; path=/`;
}
private fetchUser(): Observable<User> {