Firebase会说&“不要将其列入白名单".对于列入白名单的链接

编程入门 行业动态 更新时间:2024-10-26 12:30:23
本文介绍了Firebase会说&“不要将其列入白名单".对于列入白名单的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正忙于使用电子邮件魔术链接和此处的指南设置Firebase身份验证:

I am busy setting up a firebase authentication using an email magic link and using the guide here:

firebase.google/docs/auth/android/email-link-auth

它说我需要将一个域列入白名单,但是除了我创建的动态链接之外,我在控制台中找不到任何可以执行此操作的地方.我尝试运行以下代码,但得到

It says I need to whitelist a domain, but I cannot find any place in the console to do that, other than the dynamic link I created. I tried running the below code, but I get

[UNAUTHORIZED_DOMAIN:该域未被项目列入白名单]

[ UNAUTHORIZED_DOMAIN:Domain not whitelisted by project ]

val actionCodeSettings = ActionCodeSettings.newBuilder() // URL you want to redirect back to. The domain (www.example) for this // URL must be whitelisted in the Firebase Console. .setUrl("myapphere.page.link/register") //I created this dynamic link in the firebase console .setHandleCodeInApp(true) .setAndroidPackageName( "com.myapphere", true, "1") .build() val auth = FirebaseAuth.getInstance() auth.sendSignInLinkToEmail(email, actionCodeSettings) .addOnCompleteListener(this) { task -> if (task.isSuccessful) { // Sign in success, update UI with the signed-in user's information } else { // If sign in fails, display a message to the user. } }

我不应该使用动态链接进行Firebase身份验证吗?如果是这样,我会在控制台中将域列入白名单,因为找不到它.

Am I not supposed to use dynamic links for firebase authentication? And if so, where in the console do I whitelist domains, because I cannot find it.

推荐答案

  • 转到Firebase控制台
  • 单击身份验证"菜单>登录方法"选项卡
  • 向下滚动到授权域
  • 单击添加域"按钮,添加您的域(带有参数的网站域),然后单击添加"
  • 更多推荐

    Firebase会说&“不要将其列入白名单".对于列入白名单的链接

    本文发布于:2023-11-27 06:49:45,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1637028.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:名单   将其   会说   链接   Firebase

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!