Why is my application not saving anything into Cookies and Local Storage when run on localhost?
It is Angular10/Express app.
If I deploy the application on the server and I visit the website then when I inspect the app I can see Cookies being populated and Local Storage being used but if I run application on localhost (:4200 FE, :3000 BE) then Cookies and Local Storage are empty.
The issues I have with this are that for example express BE uses CSRF for protection (this can be commented out) but on FE this doesn't save anything localStorage.setItem('authUser', JSON.stringify(authUser));
which later makes role based pages in app unusable.
This happens in all browsers (Chrome, Firefox and Safari).
Did I miss something? Seems like some very simple issue but seach didn't help.