Store strings with origin-scoped browser storage
#localStorage persists strings across ordinary page sessions; sessionStorage has a tab/session lifetime. Storage access can fail, and storage is not an authorization boundary.
Fragment
Same-origin script can read these values. Plan quota, privacy-mode and schema-version behavior; do not treat browser storage as a protected credential vault.