fix(stores): bump AE_LOC_VERSION to 2; add ae_idaa_loc version wipe

AE_LOC_VERSION 1→2: force-clears stale ae_loc localStorage on next page
load for all users. Fixes users stuck on "Verifying identity..." in the
IDAA iframe — their cached site_cfg_json predated novi_idaa_api_key being
added to the site record, leaving api_key null so verification never ran.

AE_IDAA_LOC_VERSION 1: ae_idaa_loc (Novi auth state) was never included in
store_versions.ts — no wipe mechanism existed for it. Added now so future
schema changes can be handled cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-30 17:41:13 -04:00
parent 0e9a26cdca
commit 0d49ff3b8d

View File

@@ -30,8 +30,9 @@
* 'ae_events_loc' → AE_EVENTS_LOC_VERSION
*/
export const AE_LOC_VERSION = 1;
export const AE_LOC_VERSION = 2; // Bumped 2026-03-30: force-clear stale site_cfg_json (novi_idaa_api_key missing bug)
export const AE_EVENTS_LOC_VERSION = 1;
export const AE_IDAA_LOC_VERSION = 1; // Added 2026-03-30: was missing, no wipe mechanism existed
// Version check side-effect: runs on import, before any persisted() call.
// Guard presence of `localStorage` and its functions for safety (SSR, Node flags).
@@ -42,6 +43,7 @@ if (
) {
_check_and_wipe('ae_loc', AE_LOC_VERSION);
_check_and_wipe('ae_events_loc', AE_EVENTS_LOC_VERSION);
_check_and_wipe('ae_idaa_loc', AE_IDAA_LOC_VERSION);
}
function _check_and_wipe(key: string, expected_version: number): void {