Skip to content

Commit f278fcc

Browse files
committed
MSC2918: use expires_in_ms instead of expires_in
1 parent 8e91df4 commit f278fcc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/matrix/SessionContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class SessionContainer {
115115
log.set("id", sessionId);
116116

117117
if (loginData.refresh_token) {
118-
sessionInfo.accessTokenExpiresAt = clock.now() + loginData.expires_in * 1000;
118+
sessionInfo.accessTokenExpiresAt = clock.now() + loginData.expires_in_ms;
119119
sessionInfo.refreshToken = loginData.refresh_token;
120120
}
121121

src/matrix/net/TokenRefresher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class TokenRefresher {
5656

5757
this._accessToken.set(response["access_token"]);
5858
this._accessTokenExpiresAt.set(
59-
this._clock.now() + response["expires_in"] * 1000
59+
this._clock.now() + response["expires_in_ms"]
6060
);
6161
}
6262

0 commit comments

Comments
 (0)