繁体   English   中英

Vercel 部署和 Firebase 身份验证 - 无法自定义重定向 URL Google 身份验证提供程序弹出窗口

[英]Vercel Deployment and Firebase Authentication - Unable to Customise Redirect URL Google Auth Provider Popup

我对使用云 Firestore 和 firebase 身份验证的 NextJS 应用程序有疑问,该应用程序使用 vercel 部署部署,并且域也使用 vercel 本身注册。

  • 部署:Vercel
  • 领域:Vercel
  • 认证:Firebase 认证
  • 数据库:Cloud Firestore
  • 存储:Firebase 存储

I followed this document https://firebase.google.com/docs/auth/web/google-signin#expandable-4 but without firebase hosting and custom domain registration with firebase, I cannnot “Customizing the redirect domain for Google sign-inOn项目创建”

下面的配置不起作用

firebase config {
 authDomain: “customdomain.com”
}

我无法将域更改为 firebase 托管,因为那样我将无法使用 vercel 进行部署。

有没有办法在验证用户时保留我的 vercel 部署并自定义重定向 url。

Firebase 控制台> 身份验证> firebase 控制台单击设置选项卡
设置
然后 select 授权域并添加您的自定义域,如果您不确定检查控制台 firebase 通常会告诉您应该在那里添加什么域,例如我的看起来像这样

project-banner-eta.vercel.app

这种方式也对我有用

Firebase 控制台> 身份验证 > firebase 控制台单击设置选项卡设置,然后 select 添加域这将弹出一个域框,告诉您输入域名并将其粘贴到那里并粘贴所有域名。 现在一切都应该没问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM