I am using express-session and express-mysql-session in my app to generate sessions and store them in mysql database. Sessions are stored in a table called sessions. Sessions are stored in table but the value of it is not as same as the session value in client-side or console. Example: decoded value in client-side and console is s:fiNdSdb2_K6qUB_j3OAqhGLEXdWpZkK4.eKUawMNIv7ZtXSweWyIEpfAUnfRd6/rPWr+PsjuGCVQ, However the value
Tag: express-session
How to resolve: express-session deprecated maxAge as Date; pass number of milliseconds instead
Hey so I am trying to set my express-session cookie maxAge, so it is giving me that deprecation warning. So I see that I have to be using milliseconds however what I fail to achieve is how can I get the current date using milliseconds? I looked at MDN Docs unless I did not understand I thought if I did
User ID won’t save into session after a log in
I’m new to coding and I’m trying to write one of my first apps. I encountered a problem with my log in function. The user id saves into my session object after user registration but it won’t save into it after a log in. I’m using MongoDB. Here is the code: Controller Model Screenshot of the console – registration Screenshot