Skip to content

Commit ec910cd

Browse files
VIA-254 Alter logging of new APIM token expiry times
1 parent e10f682 commit ec910cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/auth/callbacks/get-token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function _getOrRefreshApimCredentials(config: AppConfig, token: JWT, nowIn
8080
"getOrRefreshApimCredentials: Getting new APIM creds.",
8181
);
8282
updatedApimCredentals = await retrieveApimCredentials(token.nhs_login.id_token);
83-
log.info(`First APIM token fetched. expiry time: ${token.apim.expires_at}`);
83+
log.info(`First APIM token fetched. expiry time: ${updatedApimCredentals.expiresAt}`);
8484
log.debug({ context: { updatedApimCredentals } }, "getOrRefreshApimCredentials: New APIM creds retrieved.");
8585
} else {
8686
const expiryWriggleRoom = 30;
@@ -99,7 +99,7 @@ async function _getOrRefreshApimCredentials(config: AppConfig, token: JWT, nowIn
9999
"getOrRefreshApimCredentials: Refreshed APIM creds retrieved.",
100100
);
101101

102-
log.info(`New APIM token fetched. expiry time: ${token.apim.expires_at}`);
102+
log.info(`New APIM token fetched. expiry time: ${updatedApimCredentals.expiresAt}`);
103103
} else {
104104
log.debug(
105105
{ context: { existingApimCredentals: token.apim, timeRemaining: expiresSoonAt - nowInSeconds } },

0 commit comments

Comments
 (0)