Skip to content

Commit

Permalink
MSC2918: use expires_in_ms instead of expires_in
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed May 20, 2021
1 parent 778febf commit 3f2eb3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/matrix/SessionContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class SessionContainer {
log.set("id", sessionId);

if (loginData.refresh_token) {
sessionInfo.accessTokenExpiresAt = clock.now() + loginData.expires_in * 1000;
sessionInfo.accessTokenExpiresAt = clock.now() + loginData.expires_in_ms;
sessionInfo.refreshToken = loginData.refresh_token;
}

Expand Down
2 changes: 1 addition & 1 deletion src/matrix/net/TokenRefresher.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TokenRefresher {

this._accessToken.set(response["access_token"]);
this._accessTokenExpiresAt.set(
this._clock.now() + response["expires_in"] * 1000
this._clock.now() + response["expires_in_ms"]
);
}

Expand Down

0 comments on commit 3f2eb3d

Please sign in to comment.