Skip to content

Commit

Permalink
fix: Fixed expires_in having decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
spuxx1701 committed Sep 6, 2024
1 parent e357bce commit 1fb8024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/utils/client.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function parseAccessToken(accessToken: string) {
export function getExpiresInSeconds(accessToken: string) {
const { exp } = parseAccessToken(accessToken);
const now = new Date().getTime();
const expiresIn = (exp * 1000 - now) / 1000;
const expiresIn = Math.floor((exp * 1000 - now) / 1000);
return expiresIn;
}

Expand Down

0 comments on commit 1fb8024

Please sign in to comment.