Merges the two existing copies found in the audit: ama-deep's (has the
full logout() convenience method: revoke tokens, remove the local user,
and redirect to the IdP's logout endpoint) and data-sheet-portal's
(injects a custom storage instead of the raw window.localStorage
global) - data-sheet-portal's copy had dropped logout(), kept here
since ama-deep still calls it.
Configuration is passed in via the constructor rather than read from
import.meta.env internally, unlike both source copies: this class ships
pre-built in a published package, and each consuming app names its OIDC
env vars slightly differently - the caller's own app code (where
import.meta.env.VITE_OPEN_ID_* is inlined correctly by that app's own
Vite build) is the right place to read them.
Thin wrapper around
oidc-client-ts'sUserManager.Merges the two existing copies found in the audit:
ama-deep's (has the fulllogout()convenience method: revoke tokens, remove the local user, and redirect to the IdP's logout endpoint) anddata-sheet-portal's (injects a custom storage instead of the rawwindow.localStorageglobal) -data-sheet-portal's copy had droppedlogout(), kept here sinceama-deepstill calls it.Configuration is passed in via the constructor rather than read from
import.meta.envinternally, unlike both source copies: this class ships pre-built in a published package, and each consuming app names its OIDC env vars slightly differently - the caller's own app code (whereimport.meta.env.VITE_OPEN_ID_*is inlined correctly by that app's own Vite build) is the right place to read them.