Ionic Android“;不支持重定向_ uri”;脸书

Ionic Android "the redirect_uri is not supported" Facebook

本文关键字:uri 脸书 不支持 Android Ionic 重定向      更新时间:2023-09-26

我是社交网络身份验证的新手,但我正在开发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应用程序详细信息:
应用程序ID:1553815514880424
网站URL:http://localhost:3000/
应用程序域:localhost

我遇到了一个类似的问题,一个web客户端和谷歌给出了相同的响应。如果你选择隐式流动,它对你有用吗。尝试:

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