diff --git a/addons/api/addon/handlers/indexed-db-handler.js b/addons/api/addon/handlers/indexed-db-handler.js index 6719eca78..aea1b2e0f 100644 --- a/addons/api/addon/handlers/indexed-db-handler.js +++ b/addons/api/addon/handlers/indexed-db-handler.js @@ -102,6 +102,12 @@ export default class IndexedDbHandler { if (payload.removed_ids?.length > 0) { await indexedDb[type].bulkDelete(payload.removed_ids); } + // This is a temporary fix of clearing the DB (specifically for auth-methods) + // since we are not storing the token we do not get back a list of removed_ids + // from the API call and we do not want deleted items from showing in list view. + if (!storeToken) { + await indexedDb[type].clear(); + } const normalizedPayload = serializer.normalizeResponse( store,