react-native-oauth icon indicating copy to clipboard operation
react-native-oauth copied to clipboard

Get more credentials returned by provider

Open yuoppp opened this issue 8 years ago • 0 comments

With a custom provider

manager.addProvider({ 'vkontakte' : { auth_version: '2.0', authorize_url: 'https://oauth.vk.com/authorize', access_token_url: 'https://oauth.vk.com/access_token', callback_url: ({ client_id }) => vk${client_id}://authorize, } });

I got the following credentials:

accessToken:"XXXXXXXXXXXXXXXXXXXXX" authorizationHeader: "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXX" clientID: "XXXXXX" idToken: null scopes: null type: "Bearer"

But I know, that Vkontakte returns user_id and email. In adb logcat i see the following:

09-08 17:19:29.956 28474 28474 D OAuthManager: Credential raw response: {"access_token":"XXXXXXXXXXXX","expires_in":86400,"user_id":XXXXX,"email":"[email protected]"}

how do i get this fields?

yuoppp avatar Sep 08 '17 14:09 yuoppp