shinyauthr icon indicating copy to clipboard operation
shinyauthr copied to clipboard

How can I set the cookie expiration time to 30 minutes?

Open fishskywd opened this issue 1 year ago • 1 comments

We all known cookie expiration is count by days, if I want to set it count by minutes what should I do guys?

fishskywd avatar Nov 05 '24 14:11 fishskywd

Hello,

I believe this to be possible by slightly modifying the last line in the function "get_sessionids_from_db()" i.e:

From:

filter(login_time > now() - days(expiry))

To:

filter(login_time > now() - minutes(expiry))

With the updated function, using get_sessionids_from_db(..., expiry = 30) will treat cookie expiry as 30 minutes.

jeanKRS avatar Jul 31 '25 16:07 jeanKRS