mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-05-09 08:25:29 +02:00
[GH-ISSUE #100] Keycloak session timeout doesn’t trigger logout — app remains connected until token error #53
Labels
No labels
bug
enhancement
pull-request
question
question
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/unifi-voucher-site#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @morb3at on GitHub (Nov 10, 2025).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/100
Originally assigned to: @glenndehaan on GitHub.
The problem
When using the UniFi Voucher Docker app integrated with Keycloak for authentication, user sessions are not being invalidated on the application side after the Keycloak SSO session expires.
Currently, when the Keycloak session times out (e.g., after 30 minutes of inactivity), the app continues running as if still authenticated. Once a new request is made, it fails with the following error:
OPError: invalid_token (Token verification failed) at throwAuthenticateErrors (/app/node_modules/openid-client/lib/helpers/process_response.js:18:11) at processResponse (/app/node_modules/openid-client/lib/helpers/process_response.js:41:7) at Client.userinfo (/app/node_modules/openid-client/lib/client.js:1135:18)This causes the interface to appear disconnected without any visible logout or redirect for the user.
Expected Behavior
When the Keycloak session expires or the token becomes invalid, the app should automatically:
Actual Behavior
Steps to Reproduce
Environment
Suggested Fix
Implement proper Frontchannel or Backchannel Logout handling in the app so Keycloak can notify it when the user session expires.
Alternatively, add a mechanism to detect expired sessions and redirect users to the login page automatically.
What version of UniFi Voucher Site has the issue?
8.3.0
What was the last working version of UniFi Voucher Site?
No response
What type of installation are you running?
Docker
Anything in the logs that might be useful for us?
Additional information
No response
@glenndehaan commented on GitHub (Nov 11, 2025):
Hi @morb3at,
I have just released version 8.3.1.
This resolves the issue you are encountering where the system can't fetch user data if the token has expired.
Since this function was not caught before it would leave users stuck on an error page.
This has been fixed and tested against the following scenarios:
For now I don't see the need for front/back channel logout methods.
One last note for myself: front channel logout is not supported by the dependency
Kind regards,
Glenn de Haan