mauriciovigolo / keycloak-angular

Easy Keycloak setup for Angular applications.
MIT License
730 stars 280 forks source link

Catch sign out event or redirect to ssop event #546

Open ValentinKrigovsky opened 8 months ago

ValentinKrigovsky commented 8 months ago

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search for issues before submitting
- [x ] feature request

Versions.

"keycloak-angular": "^15.1.0",
"keycloak-js": "^23.0.7",
 angular 17

Repro steps.

Sign in to app, close browser, open app again after refrsh token lifetime, get signed out automatically. Can this event be caught?

Desired functionality.

I would like to be able to catch event when user is logged out, because i am storing some additional data like tenant in local storage, but i want to have it cleared on signing in again, but because there is no way to catch this event, i am unable to do so), i tried keycloak events in before keycloak-init, but none is triggered in this case