mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Fix revoke token type param
This commit is contained in:
parent
b24e293a8e
commit
aacb4342c5
@ -490,9 +490,9 @@ export class Client {
|
|||||||
encoding: this._platform.encoding,
|
encoding: this._platform.encoding,
|
||||||
crypto: this._platform.crypto,
|
crypto: this._platform.crypto,
|
||||||
});
|
});
|
||||||
await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access" });
|
await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access_token" });
|
||||||
if (sessionInfo.refreshToken) {
|
if (sessionInfo.refreshToken) {
|
||||||
await oidcApi.revokeToken({ token: sessionInfo.refreshToken, type: "refresh" });
|
await oidcApi.revokeToken({ token: sessionInfo.refreshToken, type: "refresh_token" });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const hsApi = new HomeServerApi({
|
const hsApi = new HomeServerApi({
|
||||||
|
@ -307,7 +307,7 @@ export class OidcApi<N extends object = SegmentType> {
|
|||||||
async revokeToken({
|
async revokeToken({
|
||||||
token,
|
token,
|
||||||
type,
|
type,
|
||||||
}: { token: string, type: "refresh" | "access" }): Promise<void> {
|
}: { token: string, type: "refresh_token" | "access_token" }): Promise<void> {
|
||||||
const revocationEndpoint = await this.revocationEndpoint();
|
const revocationEndpoint = await this.revocationEndpoint();
|
||||||
if (!revocationEndpoint) {
|
if (!revocationEndpoint) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user