@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.

Hey team!

This topic seems related to the new Auth0 Integration available new in Vercel Marketplace. This is the first version of this integration, and we welcome your feedback to improve future iterations.

You’ll need an existing Vercel project to use the new integration to build and customize the Identity flow. You can either import your project into Vercel or use a Vercel template so you don’t have to start from scratch like our SaaStart template to deploy a production-ready B2B SaaS app in minutes (learn more here).

If you find yourself having questions regarding this new integration for the next two weeks, we are hosting an Ask Me Anything session. Our Product Expert will provide comprehensive written answers on August 8th from 8 AM to 10 AM PST.

Find out more about Auth0 Integration and learn more about AMA.

Thanks!
Dawid