From aacb4342c56fb2fd6a369f5c157d8fb05a7fd716 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Mon, 22 Aug 2022 10:48:05 +0530 Subject: [PATCH] Fix revoke token type param --- src/matrix/Client.js | 4 ++-- src/matrix/net/OidcApi.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matrix/Client.js b/src/matrix/Client.js index 027fd931..c1d48968 100644 --- a/src/matrix/Client.js +++ b/src/matrix/Client.js @@ -490,9 +490,9 @@ export class Client { encoding: this._platform.encoding, crypto: this._platform.crypto, }); - await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access" }); + await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access_token" }); if (sessionInfo.refreshToken) { - await oidcApi.revokeToken({ token: sessionInfo.refreshToken, type: "refresh" }); + await oidcApi.revokeToken({ token: sessionInfo.refreshToken, type: "refresh_token" }); } } else { const hsApi = new HomeServerApi({ diff --git a/src/matrix/net/OidcApi.ts b/src/matrix/net/OidcApi.ts index 61b3be7d..e5c1838a 100644 --- a/src/matrix/net/OidcApi.ts +++ b/src/matrix/net/OidcApi.ts @@ -307,7 +307,7 @@ export class OidcApi { async revokeToken({ token, type, - }: { token: string, type: "refresh" | "access" }): Promise { + }: { token: string, type: "refresh_token" | "access_token" }): Promise { const revocationEndpoint = await this.revocationEndpoint(); if (!revocationEndpoint) { return;