Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api/functions/entraId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
} from "../../common/config.js";
import {
BaseError,
DecryptionError,

Check warning on line 12 in src/api/functions/entraId.ts

View workflow job for this annotation

GitHub Actions / Run Unit Tests

'DecryptionError' is defined but never used. Allowed unused vars must match /^_/u
EntraFetchError,
EntraGroupError,
EntraGroupsFromEmailError,
Expand Down Expand Up @@ -108,7 +108,8 @@
redisClient: clients.redisClient,
key: cacheKey,
data: JSON.stringify({ token: result.accessToken }),
expiresIn: result.expiresOn.getTime() - new Date().getTime() - 3600,
expiresIn:
(result.expiresOn.getTime() - new Date().getTime()) / 1000 - 120, // get new token 2 min before expiry
encryptionSecret,
});
}
Expand Down
Loading