nraboy / ng-cordova-oauth

AngularJS oauth library for use with Apache Cordova projects
https://www.thepolyglotdeveloper.com
MIT License
456 stars 199 forks source link

Getting ERR_CONNECTION_REFUSED on linked in authentication #288

Closed arinrare closed 7 years ago

arinrare commented 7 years ago

Hello,

Trying to use this library to log in to linked in in an Ionic project on cloud9. Have it all set up, and it is working, logging in and able to retrieve profile data, with one small problem. Just for a second, after the user logs in, the in app browser redirects to an error page that says ERR_CONNECTION_REFUSED. Then it continues on. I have tried many solutions, all without success. This is occurring on an Android Simulator.

I have the callback uri on Linked In Developer site set to: http://localhost/callback AND i have tried also adding http://localhost:5000/oauthcallback.html as per one post. I have updated the latest version of the inapp browser installed: Fetching plugin "cordova-plugin-inappbrowser@1.5.0" via npm

Any tips or help on this would be appreciated

Mike

nraboy commented 7 years ago

Explicit grants will show that error if using localhost as the callback. You'll need to override the redirect URL to a remotely hosted website if you want to get around it.

arinrare commented 7 years ago

Thank you, i did read this solution but wasn't sure how to go about doing it. Can i use any website? And where do i override the redirect URL?

nraboy commented 7 years ago

You do it via the options parameter. You'll have to look on stack overflow or previously closed issue tickets for help. I only squash bugs and add features. I can't offer free support, sorry.