Files
SKroman108 9384b4efe4 fix(auth): delete auth tokens past their expiration date
Tokens with an explicit expiration date are rejected once it has passed,
but invalidateOldTokens() only looks at last_activity, so a permanent
token with an expiry stays in oc_authtoken and in Devices & sessions for
a year. Apps that create short-lived tokens (e.g. Passwords web UI
sessions) pile up hundreds of dead entries.

Delete them in the hourly clean-up once they expired more than
token_auth_expired_token_retention seconds ago (default 7 days). The
grace period keeps the existing behaviour that a client still sending an
expired token is rejected quietly instead of counting as a failed login.
Remote wipe tokens keep their own retention.

Fixes #61833

Signed-off-by: SKroman108 <138336203+SKroman108@users.noreply.github.com>
2026-11-18 20:31:08 +00:00
..