I am using keycloak-angular for my login page.
If I terminate a user's session from the Keycloak's admin panel I don't receive any event when doing:
this.keycloakService.keycloakEvents$.subscribe((event: KeycloakEvent) => {
console.log(event);
});
The user can keep using the app until he clicks the refresh button. How can I log him out immediately?
i don't think this is possible. There is no WebSocket connection or equivalent open in order to get the events from the Admin page.
In my opinion the only solution would to check the state periodically with a setInterval() but it's not a very elegant and performant solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With