Clear account idb table on logout (#28996)
* Clear account idb table on logout to remove old deactivated refresh token when logging out Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Simplify code Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
5882b004f5
commit
2559cba482
@@ -1049,9 +1049,9 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
|
||||
window.localStorage.clear();
|
||||
|
||||
try {
|
||||
await StorageAccess.idbDelete("account", ACCESS_TOKEN_STORAGE_KEY);
|
||||
await StorageAccess.idbClear("account");
|
||||
} catch (e) {
|
||||
logger.error("idbDelete failed for account:mx_access_token", e);
|
||||
logger.error("idbClear failed for account", e);
|
||||
}
|
||||
|
||||
// now restore those invites, registration time and previously set device language
|
||||
|
||||
Reference in New Issue
Block a user