从 vscode 和 chrome 调试 firebase auth 应用程序不起作用

tod*_*tle 7 google-chrome visual-studio-code firebase-authentication

我有一个网络应用程序(角度),它使用 firebase 身份验证与 google 登录提供程序。在 Windows 上,当我使用 vscode 以调试模式附加到 chrome 到 localhost:4200 上运行的应用程序时,当我在输入我的 google 凭据后尝试在弹出窗口中使用 google 帐户登录时,会收到以下消息:

\n\n
Couldn\'t sign you in\nThis browser or app may not be secure.\nTry using a different browser. If you\xe2\x80\x99re already using a supported browser, you can refresh your screen and try again to sign in.\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果我没有在调试模式下使用 vscode 启动 chrome,而是从开始菜单启动 chrome 并将其指向 localhost:4200,则应用程序可以正常工作并成功登录。此外,当以这种方式启动时,我可以成功地使用网站上内置的 chrome 调试器。

\n\n

我在基于 Chromium 的新边缘上也遇到了同样的问题;但没有在旧边缘得到它。

\n\n

我想知道 chrome 中是否有一些安全设置需要调整?或者是 gcp/google 身份验证设置。

\n\n

来自 vscode 的 launch.json 供参考:

\n\n
 {\n      "type": "chrome",\n      "request": "launch",\n      "name": "Launch Chrome against localhost:4200 for pitch evaluator",\n      "url": "http://localhost:4200",\n      "webRoot": "${workspaceFolder}/apps/pitch-evaluator"\n    },\n
Run Code Online (Sandbox Code Playgroud)\n\n

这曾经有效;所以我不知道发生了什么变化;但怀疑谷歌和铬安全性发生了一些变化。

\n

Mus*_*alo 10

从这个链接....

    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}",
            "userDataDir": false    // <----- Note this line
        }
    ]
Run Code Online (Sandbox Code Playgroud)

注意:请确保关闭所有Chrome 实例