We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1196a70 commit 69f4668Copy full SHA for 69f4668
server/plugins/http-proxy.js
@@ -28,8 +28,8 @@ function proxyPlugin(fastify) {
28
// Check if the access token is expired or about to expire
29
const expiresAt = request.encryptedSession.get(keyTokenExpiresAt);
30
const now = Date.now();
31
- const REFRESH_BUFFER_SECONDS = 20 * 1000; // to allow for network latency
32
- if (!expiresAt || now < expiresAt - REFRESH_BUFFER_SECONDS) {
+ const REFRESH_BUFFER_MILLISECONDS = 20 * 1000; // to allow for network latency
+ if (!expiresAt || now < expiresAt - REFRESH_BUFFER_MILLISECONDS) {
33
request.log.info("Access token is still valid; no refresh needed.");
34
return;
35
}
0 commit comments