Cookie set then suddenly removed when deployed
My deployed nextjs app has a strange behavior that doesn't occur in localhost (as you can see in the video)
When authenticated via Supabase, the cookie is set, then suddenly removed.
I tried debugging this, in the middleware, server & client.
I've tried configuring the cookie options manually so I'd be able to handle multiple envs (local vs preview vs prod):
You'll find the code for the server.ts, client.ts & middleware.ts in the following gist: https://gist.github.com/FaresKi/2bf082eacce888431d7f28c640e8b0c4.
Is there something i can do in the meantime to debug ? As it's a pain to troubleshoot haha
When authenticated via Supabase, the cookie is set, then suddenly removed.
I tried debugging this, in the middleware, server & client.
I've tried configuring the cookie options manually so I'd be able to handle multiple envs (local vs preview vs prod):
You'll find the code for the server.ts, client.ts & middleware.ts in the following gist: https://gist.github.com/FaresKi/2bf082eacce888431d7f28c640e8b0c4.
Is there something i can do in the meantime to debug ? As it's a pain to troubleshoot haha