Eny*_*iny 8 firebase firebase-hosting firebase-authentication
我正在为我的网络应用程序使用 Firebase 身份验证,并为 Firebase 身份验证的 Google 登录功能自定义重定向域,以便 Google 的身份验证页面将显示Continue to: mydomain.io,
我遵循了Firebase 的文档:
auth.mydomain.io到 Firebase 控制台中的授权域列表https://auth.mydomain.io/__/auth/handlerconst firebaseConfig = {
...
authDomain: "auth.mydomain.io",
...
}
Run Code Online (Sandbox Code Playgroud)
在本地运行我的应用程序,我可以看到我的域已正确链接到我的应用程序。
但是,当我选择要连接的 Google 帐户时,没有任何反应。在弹出窗口中,我被重定向到auth.mydomain.io一个空白页面和顶部的无限加载栏
编辑:我使用 Facebook OAuth 也遇到同样的问题
大约 10 秒后,弹出窗口自行关闭,我在本地应用程序控制台中收到以下错误:
FirebaseError: Firebase: Error (auth/popup-closed-by-user).
at createErrorInternal (assert.ts:122:1)
at _createError (assert.ts:83:1)
at popup.ts:283:1
Run Code Online (Sandbox Code Playgroud)
当我将应用程序的 JavaScript 配置更改为myapp.firebaseapp.com属性时authDomain,它工作正常,我可以使用我的谷歌帐户登录
const firebaseConfig = {
...
authDomain: "myApp.firebaseapp.com",
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1908 次 |
| 最近记录: |