为facebook OAuth2指定多个重定向URI [英] Specify multiple redirect URIs for facebook OAuth2

查看:245
本文介绍了为facebook OAuth2指定多个重定向URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Web应用程序部署到生产站点,但我也需要执行本地开发。此外,我有几个测试服务器,我执行不同的测试活动。我想为Facebook OAuth2指定所有这些URI。使用Google OAuth2没有问题:我可以根据需要指定多个重定向URI。

My web application is deployed to a production site, but I also need to perform local development. Besides, I have a couple of test servers where I perform different testing activities. I would like to specify all these URIs for Facebook OAuth2. With Google OAuth2 there is no problem: I can specify as many redirect URIs as I need.

这可能与Facebook?怎么样?我正在使用与Facebook登录的网站选项与Facebook进行整合。

Is this possible with Facebook? How? I am using the "Website with Facebook Login" option to integrate with Facebook.

目前我正在获得:

{
    error: {
        message: "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
        type: "OAuthException",
        code: 191
    }
}


推荐答案

您将不得不按照您的要求为不同的用例创建不同的应用程序。这是您必须处理的一个奇怪的限制。

You will have to instead create different application for different Use Cases as per your requirement. This is one strange limitation that you will have to deal with.

虽然不相关但Heroku(它是合作伙伴云服务提供商)入门指南为Facebook建议与在本地工作与应用程序一起开发。

Although unrelated but Heroku's (which is partner Cloud service provider) Getting Started Guide for Facebook suggests the same work through for working locally with the application along with development.

这篇关于为facebook OAuth2指定多个重定向URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆