添加动态/通配符FACEBOOK有效的OAuth重定向URI [英] Add dynamic/wildcard FACEBOOK Valid OAuth redirect URIs

查看:324
本文介绍了添加动态/通配符FACEBOOK有效的OAuth重定向URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在不同的子域上使用Facebook登录:

I want to be able to Facebook login on different subdomains:

(例如:www.123.mywebsite.com,www.456.mywebsite。 com)

有没有办法实现这一目标?而不是一个个地手动添加它们……也许像通配符? (例如:www。*。mywebsite.com)

Is there a way to achieve this? Instead of manually adding them one by one... Like a wildcard perhaps? (ex: www.*.mywebsite.com)

我读过一些建议确保 App Domain字段设置为ex的帖子: mywebsite .com和网站URL字段用于例如: http://mywebsite.com , 有效的OAuth重定向URI为空。 这篇帖子是从2016年开始的...曾经工作过

I've read some posts that suggested to make sure the "App Domain" field is set to ex: "mywebsite.com" and the "Site URL" field is to ex: "http://mywebsite.com", while leaving the "Valid OAuth redirect URIs" empty. THIS POST was from 2016... And it used to work

但是如今,不再可能将有效的OAuth重定向URI留空。它至少需要一个。

But nowadays it's not possible anymore to leave the "Valid OAuth redirect URIs" blank. It needs at least one..

最重要的是,他们添加了严格模式

On top of that, they added a "Strict Mode"

谢谢预先

推荐答案

两个选项:


  1. 在状态参数中发送子域。有一个域可以处理来自Facebook的所有重定向,并可以通过从Facebook返回的状态参数重定向到相应的子域。

  2. 使用SDK。它使用发布消息而不是重定向。 (推荐)

这篇关于添加动态/通配符FACEBOOK有效的OAuth重定向URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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