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

Uber login with Facebook problem #247

Open haihoang88 opened 8 years ago

haihoang88 commented 8 years ago

Hi There,

I'm using cordova-oauth to login with uber in ionic with the following code:

$cordovaOauth.uber (Constants.UBER_CLIENT_ID, ["profile", "history"]).then(function(success){
            alert(JSON.stringify(success));
        }, function(error){
            alert(error);
        });

It is ok if user provide email and password and hit Login. However, if user tries to login with the Facebook button provided with the uber login site, after user enters facebook credentials and hit login, the page become white and nothing else happens. I'm not sure what to do here to fix it.

nraboy commented 8 years ago

Cross referencing a few similar tickets:

In short, Pinterest seems to have the same issue and I don't think it is something we'll be able to get around in this library. If the provider does not redirect you back to the callback regardless of the login you choose to use, I think it is a problem with the provider.

cc @matheusrocha89 @Slessi

I'd say try contacting Uber to see how why their login flow is different for username and password vs social auth, but a wild guess is they won't respond.

Anyone have any ideas?

haihoang88 commented 8 years ago

Hi @nraboy ,

Thank you for your reply. I'm trying to integrate Uber to my Ionic app, and it seems not right as a user when they see the giant "Login With Facebook" in the Uber login page yet they cannot do anything with it.

If you don't mind, may I ask do you know any other libraries out there that can solve this? I'm not an expert in angular so it might be difficult to implement the whole thing by my own.

nraboy commented 8 years ago

There are three ways to do auth:

  1. Using the InAppBrowser to use whatever auth flow the provider has (what this library does)
  2. Using the native SDK for the provider if one exists
  3. Doing the auth on your own server where you can customize the experience

Pick your poison ;-)