mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 12:37:22 +01:00
fix: try and revoke refresh token even if access token revocation fails
This commit is contained in:
parent
9bf26dadae
commit
b602c16eb7
@ -490,7 +490,14 @@ export class Client {
|
||||
encoding: this._platform.encoding,
|
||||
crypto: this._platform.crypto,
|
||||
});
|
||||
await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access_token" });
|
||||
|
||||
// if access token revocation fails then we still want to try and revoke the refresh token
|
||||
try {
|
||||
await oidcApi.revokeToken({ token: sessionInfo.accessToken, type: "access_token" });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
if (sessionInfo.refreshToken) {
|
||||
await oidcApi.revokeToken({ token: sessionInfo.refreshToken, type: "refresh_token" });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user