Add debug logs to checkAuthStatus for missing or expired JWT
This commit is contained in:
parent
f67cb50f41
commit
c536bfbf30
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user