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

$cordovaOauth.twitter() return null #256

Closed edgarnsr closed 8 years ago

edgarnsr commented 8 years ago

Hi everyone. I have an issue with twitter authentication, when I try to connect always return null, I detect this issue when I installed https://github.com/apache/cordova-plugin-wkwebview-engine. When I remove wkwebview all works fine. I tried other alternative: https://github.com/Telerik-Verified-Plugins/WKWebView but is the same result.

Regards.

nraboy commented 8 years ago

This library relies heavily on the stock Apache Cordova web view. Replacing it will likely cause this plugin to fail. There are no plans to support anything beyond the stock web view.

Best,

SeanHub commented 8 years ago

Cordova iOS 4.0+ is the default iOS version and pushes to WKWebView: https://cordova.apache.org/announcements/2015/12/08/cordova-ios-4.0.0.html

Now that I have the latest Cordova iOS (4.1.1) ng-cordova-oauth no longer works. The application now runs off a local web server, but because of this, Twitter will not accept connections from localhost. Localhost is needed when using WKWebView. Ergo, this plugin does not work with Twitter OAuth when using the latest and greatest of Cordova iOS.

nraboy commented 8 years ago

I tested others recently and they worked fine. I will try Twitter again

edgarnsr commented 8 years ago

I think the same that @SeanHub, so I searched an alternative and I found http://www.justin-credible.net/2015/12/31/use-wkwebview-in-your-cordova-app-without-a-local-web-server/. I followed the instructions but still Twitter OAuth does not work

nraboy commented 8 years ago

Just tested Twitter with the following Apache Cordova platform versions:

{
    "ios": "4.1.1",
    "android": "5.1.1"
}

Those were taken from my platforms/platforms.json file. I also validated the version of my platforms with cordova platform check.

I received no errors. I received an access token exactly as expected.