ca1c / simpleBlog-client

Create your space. A minimal and efficient blogging app.
0 stars 0 forks source link

Cookies aren't destroyed on client when they are destroyed on server #5

Open ca1c opened 2 years ago

ca1c commented 2 years ago

There isn't much to actually refactor here, just need to use the universal-cookies library's features for adding a max age to the cookies, this also ties into the can log in multiple times issue: #2

The client should say, if there is a cookies, do not let the user submit a request to log in, also, until request has finished, do not let the user submit another request, there also needs to be some functionality on the backend that doesn't let the user send a request to log in multiple times (maybe using device identification?), although this may be natural already with express's asynchronous nature, so express will wait for the other requests to finish, so if the user does send multiple requests to login, I can just check if there is already a session for that user.