DEV Community

Discussion on: NuxtJS v.2.15.8. How to hide private keys?

Collapse
 
kissu profile image
Konstantin BIFERT

Hi, what exactly are you looking to hide?
A client side app usually communicate with a backend through a clear API with public endpoints. All tokens on your client side app should be public.
If you want to hide something, use your backend as a middleware (put the sensitive/private tokens there).

You can also use a private token during the build step (that one will only be available on the server, hence private).