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.
https://stackoverflow.com/questions/56068787/where-to-store-a-jwt-token-locally-on-computer
macos has a keychain api apparently
On linux probably use
XDG_CACHE_HOME