audiobookshelf/test/server
Daniel 95af4812cd Make the refresh-token grace period configurable (default 10 min)
When /auth/refresh rotates the refresh token, the previous token is kept
valid for a short grace period so a client that never received the
rotation response (e.g. a dropped or suspended mobile request) can retry
with the old token and get back the already-rotated current token
instead of a 401.

That window was hardcoded to 60 seconds, which is too short for real
mobile conditions: iOS backgrounding, VPN/proxy timeouts, or network
handoff can delay the retry past a minute, permanently locking the
session out (#5281).

Make it configurable via REFRESH_TOKEN_GRACE_PERIOD (seconds), following
the existing REFRESH_TOKEN_EXPIRY / ACCESS_TOKEN_EXPIRY pattern, and
raise the default to 10 minutes. Adds unit tests for the new config.

Fixes #5281
2026-07-18 21:42:06 -04:00
..
auth Make the refresh-token grace period configurable (default 10 min) 2026-07-18 21:42:06 -04:00
controllers Update LibraryItemController test with 403 tests 2026-04-21 17:13:52 -05:00
finders Improved subtitle parsing to account for bare colon in title 2026-02-06 14:31:09 -05:00
managers Add ApiCacheManager test for should remove recent-episodes cache entries 2026-04-26 16:51:39 -05:00
migrations Improve book library page query performance for author sort order (#4080) 2025-03-17 17:09:49 -05:00
models Add all minified fields to expanded library item JSON so socket updates remain a strict superset of shelf payloads 2026-07-01 22:30:21 +03:00
objects Fixes + add progress to m4b and embed tools 2024-07-20 12:28:06 +03:00
providers Add tests for cleanSeriesSequence 2024-03-14 19:37:51 +02:00
utils Improved subtitle parsing to account for bare colon in title 2026-02-06 14:31:09 -05:00
Logger.test.js Log non-strings into log file like console.log does 2024-09-11 19:58:30 +03:00