lucia-auth / lucia

Authentication, simple and clean
https://lucia-auth.com
MIT License
9.46k stars 485 forks source link

[Feature Request]: Set a custom expiration time on request #1317

Closed nickyhajal closed 9 months ago

nickyhajal commented 9 months ago

Description

I would like to be able to set a longer expiry time on a session based on the device a user is signing in from.

It seems like getNewSessionExpiration can take arbitrary times, but createSession always calls getNewSessionExpiration with no parameters.

Is it possible to allow createSession to pass those follows through to allow for custom expiry times when creating a session?

pilcrowonpaper commented 9 months ago

Unfortunately no since we need to know how how long sessions lasts for when extending them. It has to be known global