Closed khromov closed 3 months ago
lucia
I have a Lucia setup with a very long expiration (9999 w). Basically I don't want the sessions to expire at all.
9999 w
export const lucia = new Lucia(adapter, { sessionExpiresIn: new TimeSpan(9999, "w"), });
When using createSessionCookie I would expect the cookie expiration to match the TimeSpan.
createSessionCookie
const session = await lucia.createSession(1, {}); const sessionCookie = lucia.createSessionCookie(session.id);
However, the Expires seems to be set about 1 year in the future:
auth_session brsyk5ll3664nwez4cvi4ycira2h727hsjya65oj localhost / 2025-07-23T21:32:06.292Z
This is a browser behavior, not a bug with our code. Browsers have a limit on cookie expirations, usually around 1-2 years
Package
lucia
Describe the bug
I have a Lucia setup with a very long expiration (
9999 w
). Basically I don't want the sessions to expire at all.When using
createSessionCookie
I would expect the cookie expiration to match the TimeSpan.However, the Expires seems to be set about 1 year in the future: