From 86ce4377a73b58315d29814a4e3bc7c894727ed1 Mon Sep 17 00:00:00 2001 From: pilcrow Date: Sat, 27 Jan 2024 21:07:27 +0900 Subject: [PATCH 1/2] Allow `SameSite=None` session cookies (#1359) --- .auri/$6cnv96d7.md | 6 ++++++ documentation/content/main/basics/configuration.md | 2 +- packages/lucia/src/auth/cookie.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .auri/$6cnv96d7.md diff --git a/.auri/$6cnv96d7.md b/.auri/$6cnv96d7.md new file mode 100644 index 000000000..22fd73c64 --- /dev/null +++ b/.auri/$6cnv96d7.md @@ -0,0 +1,6 @@ +--- +package: "lucia" # package name +type: "patch" # "major", "minor", "patch" +--- + +Allow `SameSite=None` session cookies \ No newline at end of file diff --git a/documentation/content/main/basics/configuration.md b/documentation/content/main/basics/configuration.md index 70c1b2ebb..72d693218 100644 --- a/documentation/content/main/basics/configuration.md +++ b/documentation/content/main/basics/configuration.md @@ -233,7 +233,7 @@ const sessionCookie: { }; type SessionCookieAttributes = { - sameSite?: "lax" | "strict"; // default: "lax" + sameSite?: "lax" | "strict" | "none"; // default: "lax" path?: string; // default "/"" domain?: string; // default: undefined }; diff --git a/packages/lucia/src/auth/cookie.ts b/packages/lucia/src/auth/cookie.ts index a80b8db1a..66815feaa 100644 --- a/packages/lucia/src/auth/cookie.ts +++ b/packages/lucia/src/auth/cookie.ts @@ -6,7 +6,7 @@ import type { CookieAttributes } from "../utils/cookie.js"; export const DEFAULT_SESSION_COOKIE_NAME = "auth_session"; type SessionCookieAttributes = { - sameSite?: "strict" | "lax"; + sameSite?: "strict" | "lax" | "none"; path?: string; domain?: string; }; From f073be110b1336ae4aab9cf8ce89dde977e9d2d8 Mon Sep 17 00:00:00 2001 From: "Lucy (bot)" <126932300+lucythecat@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:08:38 +0900 Subject: [PATCH 2/2] CI: Release (#1360) --- .auri/$6cnv96d7.md | 6 ------ packages/lucia/CHANGELOG.md | 6 ++++++ packages/lucia/package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 .auri/$6cnv96d7.md diff --git a/.auri/$6cnv96d7.md b/.auri/$6cnv96d7.md deleted file mode 100644 index 22fd73c64..000000000 --- a/.auri/$6cnv96d7.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -package: "lucia" # package name -type: "patch" # "major", "minor", "patch" ---- - -Allow `SameSite=None` session cookies \ No newline at end of file diff --git a/packages/lucia/CHANGELOG.md b/packages/lucia/CHANGELOG.md index 4be98df6b..a620be955 100644 --- a/packages/lucia/CHANGELOG.md +++ b/packages/lucia/CHANGELOG.md @@ -1,5 +1,11 @@ # lucia +## 2.7.7 + +### Patch changes + +- [#1359](https://github.com/lucia-auth/lucia/pull/1359) by [@pilcrowOnPaper](https://github.com/pilcrowOnPaper) : Allow `SameSite=None` session cookies + ## 2.7.6 ### Patch changes diff --git a/packages/lucia/package.json b/packages/lucia/package.json index 7b43c1434..2129d4257 100644 --- a/packages/lucia/package.json +++ b/packages/lucia/package.json @@ -1,6 +1,6 @@ { "name": "lucia", - "version": "2.7.6", + "version": "2.7.7", "description": "A simple and flexible authentication library", "main": "dist/index.js", "types": "dist/index.d.ts",