I have tried to implement a login functionality where I want to get name,email and photo of the user using Linkedin APIs, using react-native-app-auth but on clicking ‘Allow’, I am not getting back any data and neither is the WebView closing. Upon manually closing the WebView, i am getting error :
The operation couldn’t be completed. (org.openid.appauth.general error -3.)]
Code
Tried a lot of different approaches but none of them seem to work.
I have attached the code.
Any help is appreciated.
2
Answers
I have referred to resources provided by Linkedin and it worked.
This is the code that helped me.
Hope it helps.
I don’t know it works or not in react-native. last week I worked on LinkedIn API and they changed their API endpoint and permission keyword etc.
you can use their official package: "linkedin-api-client"
https://github.com/linkedin-developers/linkedin-api-js-client#constructor-1
get login URL :
get the url for login.
your redirectUrl request query get a code,
then call this functionality :