Hello everyone,
I’m encountering an issue with the nextjs-auth0 SDK.
I followed all the necessary configurations to enable login in my application, as outlined in the tutorial on the Auth0 website.
During development, everything worked seamlessly. I could log in, access user information, perform logouts, and more.
However, after building my application and transitioning to production mode, the SDK stopped functioning entirely. I noticed that the cookies defining the session (defaulted to “appSession”) are set upon login in production mode. However, upon navigating to a different page (changing the URL), the cookies are sent to the page but disappear when it loads, resulting in a loss of the user’s session.
Additionally, I observed that in production mode, another cookie named “auth_verification” appears alongside appSession. Unlike appSession, “auth_verification” persists throughout the application’s lifespan.
I’ve attempted adjusting the cookie security settings and manually initializing the SDK, but none of these alternatives have resolved the issue.
Does anyone have any insights into what might be happening and how I can resolve it? I’ve tried various approaches but haven’t found a solution.
Note:
- My project is using version 14.0.4 of Nextjs.
- I’m utilizing version 3.5.0 of the SDK.
Thanks in advance for any assistance!