BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Question on user timeout logout

Open cb3inco opened this issue 7 years ago • 11 comments

I had a user ask about the timeouts of users that are logged in. I've run into this myself and unsure what the length logged in before a user is logged out. There doesn't seem to be any onscreen prompt that a logout is pending.

Is there a way to manipulate the timeout to be something longer in the config?

I suppose a on screen alert or timeout function in the UI would be a feature request. Thanks.

cb3inco avatar Sep 04 '19 12:09 cb3inco

Hi

You can manipulate the session lifetime in your .env file. See here https://github.com/BookStackApp/BookStack/blob/16d8a667b164b60623785ab89f8a1db41fd8b680/.env.example.complete#L69

JtheBAB avatar Sep 04 '19 17:09 JtheBAB

Thanks! I got it.

cb3inco avatar Oct 10 '19 03:10 cb3inco

Hi

You can manipulate the session lifetime in your .env file. See here

https://github.com/BookStackApp/BookStack/blob/16d8a667b164b60623785ab89f8a1db41fd8b680/.env.example.complete#L69

Is that 120 minutes? I faced an issue where I spend 1 hour in creating a document and when I saved the document, the document expired as I was logged out.

mfsid avatar Nov 29 '21 10:11 mfsid

Is that 120 minutes?

Yeah. While editing, the draft-saving system should prolong your session anyway (Or show an error after if it attempts while the session is expired).

ssddanbrown avatar Nov 29 '21 14:11 ssddanbrown

Does draft-saving prolong the session here, or are drafts periodically saved automatically to avoid this dataloss? Can you advise on this @ssddanbrown ? It's a concerning topic.

BloodyIron avatar Aug 18 '22 21:08 BloodyIron

@BloodyIron I think drafts should autosave 30 seconds after any change IIRC. A draft save should prolong the session. You could still get a session timeout scenario though if sitting on the edit view without changes. If you then continued to edit then the next draft save attempt should show a warning regarding the expired session.

ssddanbrown avatar Aug 18 '22 21:08 ssddanbrown

@ssddanbrown thanks! I think those details would be worth putting on the Documentation page so that others can know that expected behaviour without having to dig for it. :) I'll have to test that behaviour ;)

Also, is SESSION_TIMEOUT in seconds or minutes? I see the env variable default to 120, but unsure units of measurement. (this being declared somewhere, the units, would also be helpful IMO)

BloodyIron avatar Aug 18 '22 21:08 BloodyIron

@BloodyIron

Also, is SESSION_TIMEOUT in seconds or minutes?

Minutes

ssddanbrown avatar Aug 18 '22 22:08 ssddanbrown

Thanks for clarifying @ssddanbrown !

BloodyIron avatar Aug 18 '22 22:08 BloodyIron

Also thanks for all your work on Bookstack and such! I really like it so far :D

BloodyIron avatar Aug 18 '22 22:08 BloodyIron

Sorry to reactivate the old thread, but does anyone knows if there are any limits in how many minutes we can set here? In the instructions it says "240", but I am not sure if that is just an example or a hard limit. I will try either way, but if someone knows already, that would save me some time testing it. Thank you!

Firvulag avatar Aug 26 '24 11:08 Firvulag