尝试使用 Auth0 和 Netlify w/ React 登录,尽管我在尝试登录时在 URL 中得到 "undefined"

Attempting to login using Auth0 and Netlify w/ React although I get "undefined" in the URL when trying to login

我想部署一个 React 应用程序,它是一个简单的 auth0 登录页面,在 localhost:3000 上,一切正常,我可以单击登录按钮,一切正常,它将我发送到 auth0 登录页面。

这是我卡住的部分:

当我推送到 Github 并部署到 netlify 并尝试使用 netlify 给我的 link 打开它时,我单击登录按钮并在 URL酒吧:https://undefined/authorize?redirect_uri=

我已经在环境部分检查了应用程序和 Netlify 上的 .env 文件,所有内容都有正确的环境变量。这是我正在测试的地方:https://reactjssample-324hz.netlify.app/

这是我设置的 URI:

允许回调 URLs:

http://localhost:3000,https://reactjssample-324hz.netlify.app

允许注销 URLs:

http://localhost:3000,https://reactjssample-324hz.netlify.app

允许的 Web 来源:

http://localhost:3000,https://reactjssample-324hz.netlify.app

请告诉我是否需要包含代码片段等任何内容。

编辑:2022 年 6 月 1 日
我已将域和 clientID 添加到 index.js 文件,但现在当我单击登录按钮时,我得到了这个: Netlify 404 page not found 虽然我现在在 URL 栏中有这个:https://tubular-klepon-a1d5fc.netlify.app/authorize?client_id= 我认为它比我以前的要好。

编辑:2022 年 6 月 2 日
这是我的应用程序的端点设置
endpoint settings

谢谢

324hz
win1H2
he/him

您似乎没有在应用程序中配置 YOUR_DOMAIN。让我们尝试用值 reactjssample-324hz.netlify.app

配置它

并且不要忘记在 Auth0 平台中配置客户域 reactjssample-324hz.netlify.app

configure YOUR_DOMAIN

希望对您有所帮助。