Supabase Auth: why set supabaseResponse in setAll() again?
Hi there! I'm following https://supabase.com/docs/guides/auth/server-side/creating-a-client which has this code:
A few questions:
A few questions:
- Why do we need to do
supabaseResponse = NextResponse.next({request})withinsetAll()? I removed it and it seems like everything is working okay. Did I miss something in my testing? - Does any of this code change if I write it directly in my
apps/web/src/middleware.tsfile? What I found is that the first line,let supabaseResponse = NextResponse.next({request}), also seems to work as justlet supabaseResponse = NextResponse.next()if I write this code inapps/web/src/middleware.ts. Is that unexpected to you?