TokenHelperService not available via Public API anymore in v14
Hi there,
I just tested Version 14 of this great library and wasn't able to import the TokenHelperService from angular-auth-oidc-client anymore. It has been removed with this commit: https://github.com/damienbod/angular-auth-oidc-client/commit/e7699f7a0c07128dd8f94dd2c5e1445f66c8863b
I know I can implement the functionality by myself, but I just wanted to ask kindly, if this change was intended. I liked having this helper right away :)
Thanks a lot and best wishes
Hey, what did you use from the helper? This was an internal helper, and normally you would not need the methods. So what did you exactly use?
I'm just using the service as an easy and built-in way to get the payload of the token (for getting the user-roles). It's ok for me to create my own Helper-Service as it is not that complex. I think, I will do that or is there maybe another preferred way to access the token-payload?
The sense behind this is that we provide every method used through a public facade, or at least as much as we can. So which method explicitly do you need? Thanks!
I'm using https://github.com/damienbod/angular-auth-oidc-client/blob/9cd967a647a32629d5fb1212947917b61b10ac1c/projects/angular-auth-oidc-client/src/lib/utils/tokenHelper/token-helper.service.ts#L42
Also a problem for myself, was using the same function.
You can use the "getPayloadFromIdToken" method, which is exposed. Docs: getPayloadFromIdToken(encode = false, configId?: string)
This is about getting the payload from the access token, not the ID token. getPayloadFromIdToken does not suffice.
I even tried the getuserData method & the userdata$ observable, Both are returning the data from the IdToken only not the access token.
PR is merged, will be in the next release.
this is released in 14.1.5