DEV Community

Discussion on: I've made up my mind. I know how to choose my next tech stack ✨

Collapse
 
idoshamun profile image
Ido Shamun

I use cookies for authenticating the users.
You are 100% correct that it is not safe to use API keys in the browser.
Usually, if you want to use API keys, they must be issues every session and can last only for a few minutes.
Once you implement cookies or any system for authenticating the users, you don't need to be afraid of a 3rd-party calling your service.

Collapse
 
shaijut profile image
Shaiju T

Nice 😄, If possible , can your share a post on how you used cookies based implementation in high level using this stack, like frond end and back-end stack used and how you made request to the back-end API from front end using cookies ? Like were the cookies was generated in client side or server side and how it was used to authenticate the API etc.

Thread Thread
 
idoshamun profile image
Ido Shamun

I will do my best!