diff --git a/.changeset/cookie-removal-flags.md b/.changeset/cookie-removal-flags.md new file mode 100644 index 000000000..fc888eeab --- /dev/null +++ b/.changeset/cookie-removal-flags.md @@ -0,0 +1,5 @@ +--- +"@faustwp/core": patch +--- + +fix[faustwp-core]: add path, sameSite, secure, and httpOnly flags to removeCookie() to match setCookie() attributes diff --git a/packages/faustwp-core/src/server/auth/cookie.ts b/packages/faustwp-core/src/server/auth/cookie.ts index 9047f2282..f1feeb533 100644 --- a/packages/faustwp-core/src/server/auth/cookie.ts +++ b/packages/faustwp-core/src/server/auth/cookie.ts @@ -70,6 +70,10 @@ export class Cookies { this.response?.setHeader( 'Set-Cookie', cookie.serialize(key, '', { + path: '/', + sameSite: 'strict', + secure: true, + httpOnly: true, expires: new Date(0), }), );