hitsave-io / xyz

Monorepo for HitSave
1 stars 0 forks source link

client: where should the JWT authentication token be stored? #18

Closed EdAyers closed 1 year ago

EdAyers commented 1 year ago

https://stackoverflow.com/questions/56068787/where-to-store-a-jwt-token-locally-on-computer

On Linux, there is no system-provided secret-storage mechanism ( https://dzone.com/articles/storing-secrets-in-linux ), but most approaches seem to write secrets to disk and then set chmod on the file to prevent access by other users.

macos has a keychain api apparently

As with Windows, you should still save this data under the user's home directory (~/) and not the shared /tmp directory. The convention on Linux for application-specific data is to use a hidden (dot-prefixed) home subdirectory, e.g. ~/.yourCompany/yourProduct or just ~/.yourProduct.

On linux probably use XDG_CACHE_HOME

EdAyers commented 1 year ago

storing in XDG_CACHE_HOME