ang*_*elo 3 reactjs auth0 next.js
如何使用 auth0 登录下一个 js 应用程序?我按照 auth0 网站的快速入门进行操作,但在登录页面上收到此错误。
<a href="/api/auth/login">Login</a>
这是pages/api/[...auth0].js
import { handleAuth } from '@auth0/nextjs-auth0';
export default handleAuth();
Run Code Online (Sandbox Code Playgroud)
我在登录页面上收到此错误。
我在我的终端中得到了这个
OPError: expected 200 OK, got: 404 Not Found
at processResponse (/home/madhav/Documents/Web Development/freelancing/frontend-affilboost/node_modules/openid-client/lib/helpers/process_response.js:48:11)
at Function.discover (/home/madhav/Documents/Web Development/freelancing/frontend-affilboost/node_modules/openid-client/lib/issuer.js:252:22)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
error: 'expected 200 OK, got: 404 Not Found'
}
Run Code Online (Sandbox Code Playgroud)
我正在Failed to load resource, the server responded with code 500进入浏览器的控制台。
我究竟做错了什么?
您在这里可能遇到的问题如下:
AUTH0_BASE_URL应设置为http://localhost:<port>AUTH0_ISSUER_BASE_URL应设置为您的 Auth0 域:https://xxx.us.auth0.comhttp://localhost:<port>/api/auth/callback替换<port>为您在本地使用的为应用程序提供服务的任何端口。
| 归档时间: |
|
| 查看次数: |
1621 次 |
| 最近记录: |