Open pako-g opened 7 years ago
I have change the
Keycloak.tokenParsed
withkeycloak.tokenParsed
You are right I didn't update the example/doc yet for changes since 0.9.0.
The authenticatedObs may return false during init phases, you may have to filter the returned values to ensure auth sucess and to get the token :
Keycloak.authenticatedObs.subscribe(authenticated => {
if (authenticated) {
this.identity = keycloak.tokenParsed;
}
});
I tried with
Keycloak.authenticatedObs.subscribe(authenticated => {
if (authenticated) {
this.isAuthenticated = authenticated;
this.parsedToken = keycloak.tokenParsed;
}
});
inside the constructor
but not work
I can not get the token, login works but I can not load user data, token, and more authenticated is always false I also updated to version 0.9.1
@ebondu Hi! do you plan to publish sources of 0.9.x version? Thanks
Hi, Of course, I will try to push it today.
I pushed last changes to the ng4 branch
Hi @ebondu.
As the documnetation doesn't match the npm version, i can't find a way to make your wrapper work with 0.9.1, even though i can see this is supposed to do exactly what i need the way i want it.
Could you please update your documentation ?
Thanks. Alan
Hi @AlanCrevon, I updated the documentation on the ng4 branch, and I will try to provide an example before the end of the week. Main changes are related to AoT compilation: some static methods of the Keycloak class are now public. That means you need to inject the keycloak and call methods on the injected object instead of calling the method statically.
After login the following variables are false or null
this is the HomeComponent
I have change the
Keycloak.tokenParsed
withkeycloak.tokenParsed
after login success