diff --git a/.changeset/brave-lizards-thank.md b/.changeset/brave-lizards-thank.md new file mode 100644 index 00000000..e59066c7 --- /dev/null +++ b/.changeset/brave-lizards-thank.md @@ -0,0 +1,5 @@ +--- +'@supabase/auth-helpers-nextjs': patch +--- + +Fix "Failed to parse cookie string" bug in middleware storage diff --git a/packages/nextjs/src/middlewareClient.ts b/packages/nextjs/src/middlewareClient.ts index 873ad73f..b2351819 100644 --- a/packages/nextjs/src/middlewareClient.ts +++ b/packages/nextjs/src/middlewareClient.ts @@ -38,7 +38,6 @@ class NextMiddlewareAuthStorageAdapter extends CookieAuthStorageAdapter { httpOnly: false }); - this.context.req.headers.append('cookie', newSessionStr); this.context.res.headers.set('set-cookie', newSessionStr); } }