Skip to content

Commit

Permalink
fix: Overriden custom cookies used inside withBlitzAuth (#4424)
Browse files Browse the repository at this point in the history
* fix: use append rather than set

* Create ninety-stingrays-double.md
  • Loading branch information
siddhsuresh authored Feb 24, 2025
1 parent 18decd1 commit 816330b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ninety-stingrays-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blitzjs/auth": patch
---

fix: Overriden custom cookies used inside `withBlitzAuth`
2 changes: 1 addition & 1 deletion packages/blitz-auth/src/server/auth-sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export class SessionContextClass implements SessionContext {
}
const cookieHeaders = this._headers.get("set-cookie")
if (response instanceof Response) {
response.headers.set("Set-Cookie", cookieHeaders!)
response.headers.append("Set-Cookie", cookieHeaders!)
} else {
response.setHeader("Set-Cookie", splitCookiesString(cookieHeaders!))
}
Expand Down

0 comments on commit 816330b

Please sign in to comment.