[Enhancement]: In the Account screen, add in a line stating how long current login session is valid, possible button to revalidate login #1336

Open
opened 2026-04-24 23:57:34 +02:00 by adam · 1 comment
Owner

Originally created by @ZLoth on GitHub (Jan 28, 2026).

Describe the Feature/Enhancement

Please add to the login screen either how long the current login session is valid and/or date that the session expired. If that period is five days or less, provide a button to revalidate login.

Why would this be helpful?

Per https://www.audiobookshelf.org/docs/#security, as of ABS 2.26.0, the variable REFRESH_TOKEN_EXPIRY controls how long the login session lasts. As of ABS v2.31.0, this is 2592000 seconds, or 30 days. It would be helpful from the user perspective how long the current session is still valid.

Future Implementation (Screenshot)

Image

Audiobookshelf App Version

Android App - 0.11.0

Current Implementation (Screenshot)

Image
Originally created by @ZLoth on GitHub (Jan 28, 2026). ### Describe the Feature/Enhancement Please add to the login screen either how long the current login session is valid and/or date that the session expired. If that period is five days or less, provide a button to revalidate login. ### Why would this be helpful? Per https://www.audiobookshelf.org/docs/#security, as of ABS 2.26.0, the variable REFRESH_TOKEN_EXPIRY controls how long the login session lasts. As of ABS v2.31.0, this is 2592000 seconds, or 30 days. It would be helpful from the user perspective how long the current session is still valid. ### Future Implementation (Screenshot) <img width="960" height="2142" alt="Image" src="https://github.com/user-attachments/assets/929020ef-6488-45b0-9993-dc9768eb5c50" /> ### Audiobookshelf App Version Android App - 0.11.0 ### Current Implementation (Screenshot) <img width="960" height="2142" alt="Image" src="https://github.com/user-attachments/assets/8e55372f-1d03-4d32-a53b-b70a82435771" />
adam added the enhancement label 2026-04-24 23:57:34 +02:00
Author
Owner

@Vito0912 commented on GitHub (Jan 28, 2026):

This should not be needed, nor should the user care about this:

  • A "session" is only valid for 1 hour, after the hour
  • the "session"/access token gets automatically "refreshed" by the refresh token
  • when this refresh happens (every 1 hour) the refresh token gets refreshed itself.

So
-> you shouldn't even ever get close to 5 days (unless you did not use the app for 25 days, but then again the app needs to create an access token anyway and updates the refresh token). It is impossible for a user to see that 5 day screen.

There currently is an issue related to sessions being deleted too early, but this is not related to this

TL;DR: A refresh token should at most be "1 hour" old or instantly get refreshed is used after than hour period. There is no "5 days left" in that regard. If the user could see that message, the token would have refreshed already.

@Vito0912 commented on GitHub (Jan 28, 2026): This should not be needed, nor should the user care about this: - A "session" is only valid for 1 hour, after the hour - the "session"/access token gets automatically "refreshed" by the refresh token - when this refresh happens (every 1 hour) the refresh token gets refreshed itself. So -> you shouldn't even ever get close to 5 days (unless you did not use the app for 25 days, but then again the app needs to create an access token anyway and updates the refresh token). It is impossible for a user to see that 5 day screen. There currently is an issue related to sessions being deleted too early, but this is not related to this TL;DR: A refresh token should at most be "1 hour" old or instantly get refreshed is used after than hour period. There is no "5 days left" in that regard. If the user could see that message, the token would have refreshed already.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1336