You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose introducing a prefix to all local storage keys that are created by Medplum to enable #clear to be more surgical and only remove Medplum created/managed local storage entries. Additionally, this would reduce the likelihood of key clashing with other systems/extensions that leverage local storage.
i.e. @medplum:${key} @medplum:logins @medplum:activeLogin
This would be a breaking change if it became the default behavior and FWIW, the MedplumClient does already expose storage as an optional input so clients could specify their own local storage wrapper that applies key prefixes and a more surgical removal.
The text was updated successfully, but these errors were encountered:
dillonstreator
changed the title
Namespace Medplum local storage keys to be more surgical with clearing & reduce likelihood of key clashing
Namespace Medplum-managed local storage keys
Jan 24, 2024
Currently, calling
MedplumClient#clear
is quite destructive and blows away all local storage entries regardless of if they're Medplum-managed.medplum/packages/core/src/client.ts
Lines 805 to 814 in 1ac4758
This is a side-effect of logging out:
medplum/packages/core/src/client.ts
Lines 1116 to 1120 in 1ac4758
I'd like to propose introducing a prefix to all local storage keys that are created by Medplum to enable
#clear
to be more surgical and only remove Medplum created/managed local storage entries. Additionally, this would reduce the likelihood of key clashing with other systems/extensions that leverage local storage.i.e.
@medplum:${key}
@medplum:logins
@medplum:activeLogin
This would be a breaking change if it became the default behavior and FWIW, the
MedplumClient
does already expose storage as an optional input so clients could specify their own local storage wrapper that applies key prefixes and a more surgical removal.The text was updated successfully, but these errors were encountered: