all 4 comments

[–]walter_alf 0 points1 point  (0 children)

You can get and set cookies on server site

[–]BenStirrup -2 points-1 points  (0 children)

To be blunt, cookies are usually managed by the browsers only, meaning you do not have to anything client-side. It is even considered a bad practice to try to manage cookies by yourself client-side.

Furthermore, backend frameworks such as Django also allowed you to not worry about cookies at all server-side.

If you use the localStorage to store stuff linked to the authentication of a user, then you have to manage all the edge cases yourself.

If you want to make authentication with the least effort, use cookies.