You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Whenever I try to log in with the correct username and password on the Next.js front end (localhost:3000), in my post request for /login I am supposed to add two properties (.isAuth, and ._id) to my req.session on my Express.js back end (localhost:8080).
At first, these two things seem to be set, at least in /login. If the /login post request returns a 201 status code, the user is supposed to get redirected to the home page, and be able to see their data. However, when I get redirected to my home page, I cannot get any user data from the /user get request because req.session._id and req.session.isAuth don't exist anymore.
When I check my MongoDB session store, the cookies do get stored every time a user logs in and do disappear after expiration, but the info I wanted to store on the 'session' part was not there. When I try to look for any cookies on Chrome Developer Tools, I don't see any.
So far I haven't found a solution that has fixed my problem yet. I have looked at similar past issues on stackoverflow, on the open and closed issues on both express-session and connect-mongo, but nothing really helped so far. I am not sure if this is an express-session issue or a connect-mongo issue, so I posted this issue here, as well as in express-session's Issues section.
**Here is the repository with all my current code surrounding this issue. **
Setting secure to true, and sameSite to none does nothing.
Including credentials in headers, cors middleware, and frontend requests did not do anything.
When I look at the secure connection icon when viewing the website on localhost:3000, I get the "Your connection to this site is not secure" warning.
Also after the post request, the Chrome Developer Tools sometimes gives an error "Attempted to use a disconnected port".
I am on iOS, and am using Chrome to look at my website.
I've tried Safari but it gives me the same problem.
If you would like to ask me about further details that I didn't mention that might contribute to this issue, or ask for clarification on anything I didn't explain that well, please don't hesitate!
Thank you all for your time and patience, it is much appreciated!
The text was updated successfully, but these errors were encountered:
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Whenever I try to log in with the correct username and password on the Next.js front end (localhost:3000), in my post request for /login I am supposed to add two properties (.isAuth, and ._id) to my req.session on my Express.js back end (localhost:8080).
At first, these two things seem to be set, at least in /login. If the /login post request returns a 201 status code, the user is supposed to get redirected to the home page, and be able to see their data. However, when I get redirected to my home page, I cannot get any user data from the /user get request because req.session._id and req.session.isAuth don't exist anymore.
When I check my MongoDB session store, the cookies do get stored every time a user logs in and do disappear after expiration, but the info I wanted to store on the 'session' part was not there. When I try to look for any cookies on Chrome Developer Tools, I don't see any.
So far I haven't found a solution that has fixed my problem yet. I have looked at similar past issues on stackoverflow, on the open and closed issues on both express-session and connect-mongo, but nothing really helped so far. I am not sure if this is an express-session issue or a connect-mongo issue, so I posted this issue here, as well as in express-session's Issues section.
If you would like to ask me about further details that I didn't mention that might contribute to this issue, or ask for clarification on anything I didn't explain that well, please don't hesitate!
Thank you all for your time and patience, it is much appreciated!
The text was updated successfully, but these errors were encountered: