hkr*_*lys 3 firebase google-cloud-firestore
我们有一个带有 Firebase 的 Web 应用程序,并且我们已经连接了自定义域,并且可以使用www.example.com.
问题:当用户登录 Gmail 时,他在 Google 页面上看到以下内容:
“登录project-60017.firebaseapp.com”
代替
登录 example.com
即使这个应用程序已经连接并与 example.com 一起使用。
我们使用以下命令初始化应用程序:
authDomain: "project-60017.firebaseapp.com",
databaseURL: "https://project-60017.firebaseio.com",
projectId: "project-60017",
storageBucket: "project-60017.appspot.com",
messagingSenderId: "75892xxxxxx"
Run Code Online (Sandbox Code Playgroud)
如果我尝试将这些 URL 更改为example.com任何内容,则不再有效。
如何让登录的用户看到example.com(我们自己的域)?
编辑:
如果我更改此设置: authDomain: "example.com",在项目设置中,登录时我将收到重定向错误:
The redirect uri in the request .../auth/handler does not match the ones autorized for the OAtuh
Run Code Online (Sandbox Code Playgroud)
对于任何正在尝试的人,我刚刚Authorized redirect URIs在 Google Cloud Console 中进行了更改。
我添加了这条记录:
https://example.com/__/auth/handler
Run Code Online (Sandbox Code Playgroud)
添加的时候不要点击保存,先点击回车,然后保存。(否则它不会被保存,这是我的问题)。
然后在 Firebase 应用程序本身中 - 您必须设置:
authDomain: "example.com",
Run Code Online (Sandbox Code Playgroud)
然后您会在登录时看到您的域名。
| 归档时间: |
|
| 查看次数: |
1197 次 |
| 最近记录: |