@auth0/nextjs-auth0: Successful login but no session (on vercel)

Hi all,

Version: @auth0/nextjs-auth0:3.5.0

The login functionality stopped working for my app running in vercel. Locally the login flow still works fine.

According to the logs, the callback method is successfully called but no session in started and no “appSession” cookie is set.

Since there is no error, I’m not sure how to diagnose this problem. Any input would be appreciated!

You can try out the login flow here: https://impressie-ai.nl/

Regards

Hi there @marcusabu !

By any chance, do you maybe miss the SessionStore in your config file residing in Vercel?

import { SessionStore } from './session/stateful-session';

Ref:

Hey Marcelina,

Thanks for getting back to me. Is this SessionStore required for NextJs? I’ve followed the quick start guide (Auth0 Next.js SDK Quickstarts: Login) which did work for me for a couple of weeks. But I don’t see a reference to this store in the guide, so not sure how to implement this.

If possible, could you provide an example?

Regards

Hi @marcusabu !

Initially, I assumed that making a session stateful was the direction to take. But after additional investigation, I believe the issue might be related to the Vercel’s caching feature.

Please review our Knowledge Solution article - Callback handler fail 400 Bad request with NextJS and let us know if you have any questions!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.