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,
};
const now = Date.now();
const claimsPayload = {
"iss": teamId,
"iat": Date.now(),
"iat": now,
};
this.token = jwt.sign(claimsPayload, privateKey, {
algorithm: "ES256",
header: tokenHeader
});
this._lastRefreshedTimeMs = now;
}
private lastReloadedTimeForAPNsIsTooRecent() {