Fix revoke token type param

This commit is contained in:
Ajay Bura 2022-08-22 10:48:05 +05:30
parent b24e293a8e
commit aacb4342c5
2 changed files with 3 additions and 3 deletions

View File

@ -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({

View File

@ -307,7 +307,7 @@ export class OidcApi<N extends object = SegmentType> {
async revokeToken({
token,
type,
}: { token: string, type: "refresh" | "access" }): Promise<void> {
}: { token: string, type: "refresh_token" | "access_token" }): Promise<void> {
const revocationEndpoint = await this.revocationEndpoint();
if (!revocationEndpoint) {
return;