确定Firebase的API网关内的Lambda域“项目未将其列入白名单”

时间:2020-07-30 20:59:43

标签: aws-lambda firebase-authentication aws-api-gateway whitelist

我有以下设置;

CloudFront-> APIG来源-> Lambda(表达REST API)-> Firebase身份验证。

我需要将域列入白名单,我已将APIG URL和CloudFront URL都添加到了Firebase上列入白名单的域中;

身份验证>登录方法>授权域;

我已将CloudFront和APIG URL都列入了白名单,这会出现以下错误;

  • id .cloudfront.net
  • id .execute-api。 region .amazonaws.com
Could not generate verification email: 
{
    "code": "auth/unauthorized-continue-uri",
    "message": "Domain not whitelisted by project"
}

域是如图所示的寄存器

registered both APIG and CloudFront URLs

问题:为什么仍然出现此错误?我是否需要输入lambda函数本身的域?如果可以,我在哪里可以找到此信息?

1 个答案:

答案 0 :(得分:0)

https://support.google.com/firebase/answer/6400741?hl=en#:~:text=To%20use%20Firebase%20Authentication%20in,of%20your%20web%20app's%20hosts

找到答案,我误解了域白名单的人。因此,这是您要重定向到的域名。

要在网络应用中使用Firebase身份验证,您必须将 之后,Firebase身份验证服务器可以重定向到的域 登录用户。默认情况下,localhost和Firebase项目的 托管域已列入白名单。您必须将整个域列入白名单 您的网络应用程序的其他任何主机的名称。