2

我是社交网络身份验证的新手,但我正在使用 Ionic、Node、Mongo 和 Satellizer https://github.com/sahat/satellizer开发一个应用程序,以使用 facebook 进行身份验证,它在浏览器上运行良好但当我在 android 模拟器上测试它时,我收到了这个错误: https ://drive.google.com/file/d/0B3vlNJIDJA6RTHlpeml5YjFxNUU/view?usp=sharing

我的本地配置:

    // Satellizer configuration
   // Configuration common for all providers.
  var commonConfig = {
    // Popup should expand to full screen with no location bar/toolbar.
    popupOptions: {
      location: 'no',
      toolbar: 'no',
      width: window.screen.width,
      height: window.screen.height
    },
  };

    // Change the platform and redirectUri only if we're on mobile
  // so that development on browser can still work. 
  if (ionic.Platform.isIOS() || ionic.Platform.isAndroid()) {
    commonConfig.redirectUri = 'http://localhost:3000';
  }

  api = "http://127.0.0.1:3000/";
  //api = "https://testing-miguelcrespo.c9.io/";
  $authProvider.loginUrl = api+'auth/login';
  $authProvider.signupRedirect = '/';


  $authProvider.facebook({
    clientId: '1553815514880424',
    url: api+"auth/facebook"
  });

我的 facebook 应用程序详细信息:
APP ID: 1553815514880424
站点 URL: http://localhost:3000/
应用程序域: localhost

4

1 回答 1

0

我有一个类似的问题,一个网络客户端和谷歌给出了相同的响应。如果您选择隐式流程,它会对您有用吗?尝试:

      $authProvider.google({
        clientId: '1553815514880424',
        url: api+"auth/facebook",
        responseType: 'token'
  });
于 2015-05-05T17:49:48.477 回答