mauriciovigolo / keycloak-angular

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

Subscription to keycloak Events$ outside Keycloak initialization function do not work #572

Closed Turtl3e closed 4 months ago

Turtl3e commented 4 months ago
- [X] bug report -> 
- [ ] feature request

Versions.

keycloak-angular: keycloak-angular: 25.0.1, angular: 17.3.0 and   "keycloak-js": "^25.0.1",

Repro steps.

    Subscription to keycloak Events$ outside Keycloak initialization function (eg. component) do not catch events.

    this.auth.keycloakEvents$.subscribe({
      next(event) {
        console.log("Keycloak event", event)
      }
    });

Desired functionality.

Subscription to keycloakEvents$.subscribe() works.