使用FirebaseUI的应用程序配置不允许给定URL [英] Given URL is not permitted by the application configuration using FirebaseUI

查看:71
本文介绍了使用FirebaseUI的应用程序配置不允许给定URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Firebase和用于演示身份验证的 FirebaseUI Android应用. Facebook登录失败并显示以下错误:

Using Firebase and the FirebaseUI Android app which is used to demo Authentication.
The Facebook login is failing with the error:

应用程序配置不允许使用URL .:应用程序的设置不允许使用一个或多个给定URL.要使用此URL,您必须在应用的设置中添加有效的本机平台

Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. To use this URL you must add a valid native platform in your App's settings

按照 Firebase文档中的说明我拥有

  1. 添加并启用了我的Facebook应用.
  2. 从Facebook将应用程序ID和应用程序密码复制到Firebase控制台
  3. 将OAuth重定向URI从Firebase控制台复制到Facebook仪表板,并复制到有效的OAuth重定向URI ,例如
  1. added and enabled my Facebook app.
  2. copied the App ID and the App secret from Facebook to the Firebase console
  3. copied the OAuth redirect URI from the Firebase console to the Facebook Dashboard in to the Valid OAuth redirect URIs, eg https://my-test-1234.firebaseapp.com/__/auth/handler
  4. set the Facebook App ID in the values/config.xml file inside the android demo app.

我也研究了类似但老的StackOverflow问题,并通过谷歌搜索解决方案,因此我还在Facebook仪表板中添加了

I have also looked at similar, but old StackOverflow questions and googled for solutions so I have also, in the Facebook Dashboard, added

  1. 应用程序域"字段中的应用程序域
  2. 作为网站的平台,带有来自Firebase控制台的URL-与OAuth重定向URI相同,例如. https://my-test-1234.firebaseapp.com

我在这里有点猜测,因为Firebase文档中没有关于Facebook设置的任何详细信息,并且Facebook Dashboard最近已更改.
另外,此一个Android应用,但使用适用于Android的FirebaseUI —与用于Android的Facebook登录.这就是为什么我在Facebook仪表板中将该平台作为网站而不是Android应用程序添加的原因.

I am guessing a bit here because there isn't any specifics in the Firebase documentation about the Facebook setup, and the Facebook Dashboard have changed recently.
Also, this is an Android app but the Facebook login implementation using FirebaseUI for Android — Auth is different compared to the normal implementation of Facebook Login for Android. This is why I added the platform as a Website and not as an Android app, in the Facebook Dashboard.

推荐答案

获取 FirebaseUI Android 使用Facebook Auth的应用,您需要在 Facebook仪表板中添加 Android 作为平台. 这是 Firebase文档中缺少的步骤.
(不需要网站平台,应用程序域"字段可以为空).

To get FirebaseUI Android App working with the Facebook Auth you need to add Android as a platform inside the In the Facebook Dashboard. This is the missing step in the Firebase documentation.
(The Website platform is not needed and the App Domains field can be empty).

还请注意,选项 Web OAuth登录应为是" (其他选项可以为否").该选项位于有效OAuth重定向URI .场地.

Also note that the option Web OAuth Login should be "Yes" (the other options can be "No") This is located next to the Valid OAuth redirect URIs. field.

这篇关于使用FirebaseUI的应用程序配置不允许给定URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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