【问题标题】:Ionic Android "the redirect_uri is not supported" FacebookIonic Android“不支持redirect_uri”Facebook
【发布时间】:2015-04-01 20:53:24
【问题描述】:

我是社交网络身份验证的新手,但我正在使用 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
网站网址: http://localhost:3000/
应用程序域: localhost

【问题讨论】:

  • 抱歉,您解决了问题吗?我在这里面临同样的情况。谢谢

标签: javascript android angularjs ionic-framework satellizer


【解决方案1】:

我的网络客户端遇到了类似的问题,Google 给出了相同的响应。如果您选择隐式流程,它对您有用吗?试试:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-03-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-15
    • 2021-12-31
    • 1970-01-01
    相关资源
    最近更新 更多