I recently used the Auth0 article to implement user login in my NextJS application. The steps I followed are outlined below:
- First, I installed
@auth0/nextjs-auth0
- Then, I wrapped my root component in
_app.tsx
with a<UserProvider>
component. - Next, I created an
auth
folder withinpages/api
and added a file named[...auth0].js
that exportshandleAuth
from@auth0/nextjs-auth0
. - Additionally, I made sure to create a
.env
file with the necessary configuration settings.
Despite following all the instructions meticulously, when I attempt to log in by clicking on the link:
<a href="/api/auth/login">Login</a>
, nothing happens - just endless loading. Furthermore, the server message displayed states: API resolved without sending a response for /api/auth/login, this could lead to stalled requests
. I have double-checked everything multiple times but remain unable to identify the issue. Any assistance or insights would be greatly appreciated.