bradtraversy / node_passport_login

Node.js login, registration and access control using Express and Passport
1.73k stars 1.3k forks source link

Set cookie expiration #134

Open reachAnushaKondam opened 2 months ago

reachAnushaKondam commented 2 months ago

fixes #133

Issue: Cookies were being created without an expiration time, causing them to expire at the end of the session by default. This behavior can lead to unintended logout issues and lack of persistence for user sessions.

Solution: Updated the cookie configuration to include a 30-day expiration time. This change ensures that cookies have a defined lifespan, improving session management and user experience.

reachAnushaKondam commented 1 month ago

@bradtraversy

could you please review this PR and issue?