mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
update refreshed time on token generation
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user