it is secure to store 'public key' in Env Variables in reactjs with vite? #13733
-
it is secure to store 'public key' in Env Variables in reactjs with vite? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Storing a public key in environment variables on the frontend is generally considered secure. Public keys are meant to be publicly accessible and do not need to be kept secret. However, If you're using a public key for encryption, the security of the system relies on the corresponding private key being kept secret. In this case, it's crucial to ensure that the private key is stored securely on the server-side and not exposed to the frontend or any other unauthorized entities. |
Beta Was this translation helpful? Give feedback.
-
I suggest to use SvelteKit is better: $env/dynamic/private |
Beta Was this translation helpful? Give feedback.
I suggest to use SvelteKit is better:
SvelteKit exposes four different modules for handling environment variables:
$env/dynamic/private
$env/dynamic/public
$env/static/private
$env/static/public