Add debug logs to checkAuthStatus for missing or expired JWT

This commit is contained in:
akastijn 2025-08-05 23:23:26 +02:00
parent f67cb50f41
commit c536bfbf30

View File

@ -73,11 +73,13 @@ export class AuthService {
public checkAuthStatus(): boolean { public checkAuthStatus(): boolean {
const jwt = this.getJwt(); const jwt = this.getJwt();
if (!jwt) { if (!jwt) {
console.log("No JWT found");
return false; return false;
} }
try { try {
if (this.jwtHelper.isTokenExpired(jwt)) { if (this.jwtHelper.isTokenExpired(jwt)) {
this.logout(); this.logout();
console.log("Token expired, logging out");
return false; return false;
} }