angular-auth-oidc-client icon indicating copy to clipboard operation
angular-auth-oidc-client copied to clipboard

Accessing token response AuthResult

Open JoellyR opened this issue 7 years ago • 6 comments

Looking through the documentation I can not seem to find a subscription or a custom callback to use to access the response object from the access_token call. In our solution there may be extra values that get added to the token response (i.e {access_token: ..., id_token: ...., customValue: ...}. Is there any way to access this using the current functions in the library? or would this need to be an enhancement?

JoellyR avatar Nov 27 '19 18:11 JoellyR

This has been refactored and changed in version 11 which we plan to release in the next few days after testing

Greetings Damien

damienbod avatar Apr 30 '20 15:04 damienbod

It seems that in version 11 there still doesnt seem to be a clean way to access this... (i can read it from session storage but i need to always change the key because its alway client_id.authnResult. Am i missing something? Or is there any road map to add this in the future? @damienbod

JoellyR avatar Jun 09 '21 22:06 JoellyR

Hi @JoellyR when have custom params which you can send and these are persisted. custom values coming backing from your STS which definition is not supported at the moment.

We have 4 or 5 different types of responses depending on the flow. So this might be difficult to support.

What do you use these for? and which response? Is this user profile data maybe? what STS do you use and which flow?

Greetings Damien

damienbod avatar Jun 10 '21 05:06 damienbod

@damienbod ahhh well i guess when i see it in session storage you just seem to store w.e was sent as a response from the access_token call, under client_id_authnResult. What i would imagine is having access to something like the AuthResult interface but instead of the AuthResult interface it would be an object that is just the parsed data from inside the session storage from whatever is under the key client_id_authnResult with all the keys that were returned from the access_token call.

JoellyR avatar Jun 17 '21 23:06 JoellyR

Hi @JoellyR We will make the AuthResult public through the APIs

Suggestion:

GetAuthResult(configId? : string)

Good?

damienbod avatar Jun 18 '21 08:06 damienbod

that sounds good thanks for your help and your quick replies!

JoellyR avatar Jun 18 '21 16:06 JoellyR