Cannot figure out how to get onAuthSuccess to fire?
See original GitHub issueHi, I need to log login and logout events so I’m using onAuthSuccess & onAuthLogout.
I cannot get onAuthSuccess to fire using keycloak.getKeycloakInstance().onAuthSuccess = ...
This approach works for onAuthLogout when I call clearToken().
I’m setting it like this:
keycloak.init(...).then(() => {
// setting here
});
If I try to set before keycloak.init() the keycloak instance is not set.
I couldn’t see any way to pass the callbacks into keycloak.init() as config options.
Any advice appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Updating something on angular with an event from another ...
If I want to update something like the login name how should call this onAuthSuccess. Should I create a function outside of angular,...
Read more >ngx-auth-firebaseui/Lobby - Gitter
I have a problem (angular v9, "ngx-auth-firebaseui": "^4.0.1") with i18n: ... In the console, I see the following: Uncaught Error: Network Error ....
Read more >angular-auth-firebaseui - npm package - Snyk
This library is an angular module (including angular components and services) that allows to authenticate your users with your firebase project.
Read more >Diff - ad20484e8e..a16189bedb - chromium/src - Git at Google
For simplicity, we'll - // use a default zero duration when we can't calculate a true value. - base::TimeTicks start_of_run = stopwatch.
Read more >keycloak-angular: Versions - Openbase
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies ... #47 - bug - Cannot figure out how to get onAuthSuccess to fire?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@abhishekkaura and @angular101
I’ve been working on a new example to show how to handle the keycloak events and I started to build it using angular 6, so I came across a bigger issue, regarding the angular versions. I expect to finish all the migration to angular 6 this weekend and also release the examples.
Just found a bug in KeycloakService while doing the example, related to the order to register the events.
@angular101, during the keycloak-js events tests, I discover that the only propagated event between tabs is the onAuthLogout. All the others don’t work between tabs. 😞
Thanks for reporting.