sahat / satellizer

Token-based AngularJS Authentication
https://satellizer-sahat.rhcloud.com
MIT License
7.86k stars 1.13k forks source link

Can't login using emulator: ionic + angular + android + google/facebook #904

Open ricardoas opened 8 years ago

ricardoas commented 8 years ago

When I run my app using "ionic serve" everything works fine... but when I run using "ionic emulate android" I see the following screen:

My app.js code is:

if (ionic.Platform.isIOS() || ionic.Platform.isAndroid()) {
    $authProvider.cordova = true;
    $authProvider.platform = 'mobile';
    commonConfig.redirectUri = 'http://localhost/';
  }

  $authProvider.facebook(angular.extend({}, commonConfig, {
    clientId: 'FB_ID',
    url: ApiEndpoint.url +'/auth/facebook'
  }));

  $authProvider.google(angular.extend({}, commonConfig, {
    clientId: '<GOOGLE ID>',
    url: ApiEndpoint.url +'/auth/google'
  }));

And the plugins enabled are:

cordova-plugin-inappbrowser 1.4.0 "InAppBrowser" cordova-plugin-keyboard 1.1.4 "Keyboard" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist"

I've seen a few tricks to solve this in other issues but nothing worked here... am I missing something?

diegopedro94 commented 8 years ago

+1 on this issue. I Have the same problem. I was using 0.14.2 version and it was working fine. With the new version upgrade it stopped working.

qdequippe commented 8 years ago

+1. Same problem only with Google, Facebook connect works well.

ricardoas commented 8 years ago

I solved the problem here downgrading it to version 0.14.1