React JS how to properly set Cookies using custom reactHooks?
I am creating the login functionalities of my website but having trouble with setting the Cookie with the token from my backend. The token is being returned properly and is setting the user in the UserContext, however the part where the token is to be stored in the browser Cookie (such as when viewed in the browser developer options Application
tab) it is not showing or being set. I have no idea whether the issue is in the Login.jsx
or in the useStorage.js
. Here are the current codes: