update refreshed time on token generation

This commit is contained in:
2025-02-02 14:57:06 -08:00
parent 311906d88d
commit 2c86d9189d

View File

@@ -38,15 +38,17 @@ export class NotificationService {
"kid": keyId, "kid": keyId,
}; };
const now = Date.now();
const claimsPayload = { const claimsPayload = {
"iss": teamId, "iss": teamId,
"iat": Date.now(), "iat": now,
}; };
this.token = jwt.sign(claimsPayload, privateKey, { this.token = jwt.sign(claimsPayload, privateKey, {
algorithm: "ES256", algorithm: "ES256",
header: tokenHeader header: tokenHeader
}); });
this._lastRefreshedTimeMs = now;
} }
private lastReloadedTimeForAPNsIsTooRecent() { private lastReloadedTimeForAPNsIsTooRecent() {