Replies: 1 comment
-
I'm currently facing the same Issue. Is there any way to work around this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🏗️ Environment
Nextjs Docker
Nextjs docker-compose.yaml
Fetching from supabase
When fetching data from supabase on the client side I use
NEXT_PUBLIC_SUPABASE_URL_CLIENT_LOCAL
and when fetching from server side I useNEXT_PUBLIC_SUPABASE_URL_SERVER_LOCAL
. This normally works successful except within the middleware.🚨 Problem
Expected Behaviour
When I fetch the user in the middleware, I expect to receive the user.
nextjs middleware.ts for supabase
❌ What happens instead
The cookies are successfully retrieved but⚠️ ❌⚠️ the session is not set⚠️ ❌⚠️ . Hence the session and user is null, even though the cookies are set.
Can someone please help me figure out why this is happening and how to fix it? I also could not find a single example on the internet which uses Docker nextjs + supabase locally. By the way, when using the hosted version of supabase it works fine, because I am accessing the public url and don't need the
host.docker.internal
anymore.Beta Was this translation helpful? Give feedback.
All reactions