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.facebook ONLY in iOS Always return the message "The sign in flow was canceled" #296

Closed radix21 closed 7 years ago

radix21 commented 7 years ago

Hi There,

I'm using the ng-cordova-oauth in my cordova app, in Android the authentication works fine but when iOS users push the login button, always return the message "The sign in flow was canceled"

I searched on the internet any thing related but without success. Any idea.

Thanks in advance

nraboy commented 7 years ago

What plugins are you using in your application? What version of iOS? Is your Facebook app configured as a mobile application or a web / desktop application?

Any information about what you're doing will help.

Best,

radix21 commented 7 years ago

Hi nraboy!

I'm using ngCordova V0.1.27-alpha ngCorodva-oauth V0.2.10 (2016-07-20)

I have tried on iPhones with iOS 7.1.2, 9.3.5 and 10. In all them the problem persist.

In Facebook App is config as a web site: config-fbapp-studiof

Thanks for your help!

nraboy commented 7 years ago

I don't know Spanish (I think that is Spanish), so I can't help as far as that picture goes. If I had to guess, it looks correct.

Did you add an ATS policy for iOS? If it works for Android it should work for iOS as it is the same code. Only things I can think of is that you're missing an ATS policy or you're using a plugin like the wkwebview that you shouldn't be.

radix21 commented 7 years ago

Hi Nraboy, thanks for your answer!

here's a list of plugins that I've installed in my App:

cordova-plugin-dialogs 1.2.0 "Notification" cordova-plugin-geolocation 2.1.0 "Geolocation" cordova-plugin-inappbrowser 1.2.1 "InAppBrowser" cordova-plugin-network-information 1.2.0 "Network Information" cordova-plugin-splashscreen 3.1.0 "Splashscreen" cordova-plugin-whitelist 1.2.1 "Whitelist" phonegap-plugin-push 1.6.3 "PushPlugin"

I've filled the inputs with the ATS policy in itunes Connect and Facebook App configuration but the Error continues T_T

radix21 commented 7 years ago

As additional info, I've followed this tutorial "How to integrate Facebook Login into a cordova based app". It Show how to implement Facebook login in Cordova apps and how to use ngCordovaOauth in non-Ionic or non-AngularJS UI based app.

https://www.sitepoint.com/how-to-integrate-facebook-login-into-a-cordova-based-app/

nraboy commented 7 years ago

The ATS policy is something you define in your app, not iTunes.

https://www.thepolyglotdeveloper.com/2015/10/fix-ios-9-app-transport-security-issues-in-apache-cordova/

Since I cannot reproduce your issue, it is not a bug. For further help you'll have to use Stack Overflow or that blog post you shared. Unfortunately I don't have the time to offer free support on how to use the library. I can only help with bugs.

Best,