-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to force users to login again after their session was closed in keycloak? #477
Comments
|
Thanks for your answer! I'm not sure I completely understood the first suggested solution. I have added the |
What I meant with the first option was something like "limit the access token lifespan to two minutes and just accept a token could be used for the remaining max two minutes of its lifespan even after it has been revoked". This is often an acceptable compromise. For the second option: when If you use two different tabs that share the same lua-resty-openidc session cookie than I can not explain why a fresh tab should behave any different from an already existing one. What you may be seeing could be a timing issue. lua-resty-openidc will only trigger the silent authentication redirect once the configured interval has passed since the user has last been logged in. If you log out the user this period may not have expired, yet. |
Thanks again now I get it! nginx/error.log
keycloak.log
Seems like there is a issue with in keycloak configuration. I will investigate this further. |
The nginx logs look as if silent re-authentication failed - keycloak redirects back with a "login_required" error. This looks fine. For this calls |
I encountered the exact same issue and handled the error from the authenticate() method.
I feel this is more a workaround tough. I would expected that this kind of error should be handled by the library itself. Without this piece code basically the user would face random 500 while navigating, page refresh wouldnt' work because most likely you are on the callback URI so the user would be stuck. |
Hi!
I´m currently trying to set up Openresty as reverse proxy with Keycloak as IdP in Kubernetes.
Accessing the proxied service works as expected and I also can logout from the proxied service via /logout.
However, when I terminate the user's session in Keycloak, the user can still refresh and use the site. I want the user to have to log in again when the session is closed. How can i achieve this?
Environment
Expected behaviour
Users have to log in again, when their session is closed in Keycloak.
Actual behaviour
When i sign out all active sessions in Keycloak the user can still use and refresh the proxied site without logging in again.
Configuration and NGINX server log files
default.conf:
Client Settings in Keycloak:
I appreciate any help!
The text was updated successfully, but these errors were encountered: