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 intentionally do not set sid cookie if no session value is set. The reason is that, if the session is empty while the sid cookie is set, we would have a redundant database call to query the session.
There are a lot of situations where a developer might need to use the session for analysing traffic..number of sessions per day, even though the session might be empty..atleast a page load might have happened.
There are a lot of situations where a developer might need to use the session for analysing traffic..number of sessions per day, even though the session might be empty..atleast a page load might have happened.
Noticed that we do not set sid cookie automatically. Would like to understand the idea behind doing this?
Shouldn't there be a way to automatically check if sid cookie exists, set
req.session
else generate a new session and set the cookie?Next also supports express style middlewares (https://nextjs.org/docs/middleware) Can we leverage that?
The text was updated successfully, but these errors were encountered: