nativescript-oauth2 icon indicating copy to clipboard operation
nativescript-oauth2 copied to clipboard

Return original data from token response

Open dlnsk opened this issue 6 years ago • 3 comments

I'm using authentication through my own server as described here: https://github.com/sahat/satellizer#-login-with-oauth-20 So, I need to save a JWT token for interacting with server in future. Now returned data can't include something different to accessToken, refreshToken etc. So, I add original data to object that produce from response. In this case I can add any useful information to server's response.

dlnsk avatar Jun 13 '19 07:06 dlnsk

Thanks for the PR, @dlnsk . The eventual goal of this plugin is to be fully OpenId compliant. I'm trying to stick to spec here: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html Access Token is what the response MUST contain according to this doc. Are you suggesting we open this up to freely name access token something else, or have access token return an empty string and your custom parameters contain the actual access token under a different name?

alexziskind1 avatar Jul 05 '19 13:07 alexziskind1

Hi! There are no breaking changes. Only one NEW parameter is added with the original data that the server responds to.

dlnsk avatar Jul 11 '19 15:07 dlnsk

Any reason this is not getting anywhere? I need the uncorrupted token response too...

ray007 avatar Jul 28 '22 08:07 ray007