sushinpv / react-secure-storage

This is a wrapper written above local storage to write the data securely to local storage
https://npmjs.com/package/react-secure-storage
MIT License
126 stars 12 forks source link

I see the value of REACT_APP_SECURE_LOCAL_STORAGE_PREFIX in the local storage #44

Closed pierroberto closed 7 months ago

pierroberto commented 7 months ago

Hi team,

I have a question about this key: REACT_APP_SECURE_LOCAL_STORAGE_PREFIX.

When I add REACT_APP_SECURE_LOCAL_STORAGE_PREFIX in my .env, let's say with the value of foo, is it correct to see in the local storage the key saved with this format: foo.{randomCharacter}}.{myKey}.

I'm not sure that this it is correct and I can't get answer from the documentation.

Thank you

sushinpv commented 7 months ago

@pierroberto This is the accurate comprehension.

The way the libraries generate the key by default is as follows:

secure.{data-type}.{key}

The REACT_APP_SECURE_LOCAL_STORAGE_PREFIX is used to customize the secure prefix