更改Google帐户选择器显示的域

mar*_*gti 2 web-applications google-oauth2 firebase-authentication angularfire2

在网络应用中,我们使用Firebase Auth来管理登录名和(基本)帐户创建。如果在具有多个Google帐户的活跃用户中使用Google登录选项,则会向用户显示Google帐户选择器,以选择要在我们网站上使用的帐户。其标题如下所示:

选择一个帐户
以继续访问mydomain.com

就我的Web应用而言,它没有显示mydomain.com,而是显示了<firebase-project-id> .firebaseapp.com

我要做的就是更改,以便帐户选择器弹出窗口显示mydomain.com

boj*_*eil 5

如果要将其自定义为:选择一个帐户继续:https : //auth.example.com 您将需要遵循以下说明:

  • 您需要将自定义域auth.example.com指向由Firebase托管托管的example.firebaseapp.com。
  • 然后,您将确保在Firebase控制台中将以下URL作为授权域列入白名单(身份验证->登录方法->授权域):auth.example.com
  • 您需要将此页面作为所有支持的提供商(Google,Facebook,Twitter,LinkedIn)的OAuth重定向URL列入白名单:https//auth.example.com/__/auth/handler
  • 最后,您需要将该域替换为authDomainJS客户端调用中的域:

    var config = { apiKey: "...", authDomain: "auth.example.com", ... };

  • DNS CNAME 记录。 (2认同)