perbaikan service

This commit is contained in:
Fuzi_fauzia 2024-07-16 13:48:21 +07:00
parent 6b91c937ab
commit 60d14b2fce
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ export class LoginService {
const tokenData = localStorage.getItem(this.tokenKey);
if (tokenData) {
const tokenInfo = JSON.parse(tokenData);
const decodedToken = jwtDecode<CustomJwtPayload>(tokenInfo.access_token);
const decodedToken = jwtDecode<CustomJwtPayload>(tokenInfo.refresh_token);
const expiryDate = decodedToken.exp * 1000;
const now = new Date().getTime();
const timeLeft = expiryDate - now;