Skip to content
Back

Cookie expiration date is 6 months instead of 1 year

  • 0
  • Self Hosted
  • Auth
  • Web
ddenev
11 Sep, 2025, 06:37

When I login to my app with createEmailPasswordSession the cookie has only 6 months of expiration but I have 1 year in Auth settings. I have console-logged the session that is returned from createEmailPasswordSession and itsexpire property shows 2026-09-11T06:20:29.919+00:00, which should be the correct session expiration time. Why is the cookie having a wrong expiration?

TL;DR
Developers are experiencing an issue where the cookie expiration date is 6 months, despite setting it to expire in 1 year in the Auth settings. The console-logged session from `createEmailPasswordSession` shows the correct expiration time. The solution may be to check the cookie settings in the application code to ensure they align with the desired expiration time.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more