From d69ef2cd20ae2510c061e7b288473cdf8801a8bc Mon Sep 17 00:00:00 2001 From: akastijn Date: Sun, 23 Nov 2025 04:48:37 +0100 Subject: [PATCH] Adjust `checkAuthStatus` timing and introduce `reloadUsername` on service initialization. --- frontend/src/app/services/auth.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/services/auth.service.ts b/frontend/src/app/services/auth.service.ts index db6368d..e8e44b4 100644 --- a/frontend/src/app/services/auth.service.ts +++ b/frontend/src/app/services/auth.service.ts @@ -23,8 +23,10 @@ export class AuthService { private snackBar: MatSnackBar ) { // Check if user is already logged in on service initialization + this.checkAuthStatus(); + timer(1000).subscribe(() => { - this.checkAuthStatus(); + this.reloadUsername(); }); }