When creating a new lucia instance, I want to specify cookies sameSite property as "none". Everything works as expected, but when using TypeScript SessionCookieAttributesOptions only has sameSite?: "lax" | "strict" without "none" option. As a result, I get a type error, and additional user attributes( email, createdAt, etc. ) are not added to user type.
So this is only a type error, as logic itself works correctly.
Also not specifying sameSite or setting it to undefined is not equal to setting it to "none".
const lucia = new Lucia(adapter, {
sessionCookie: {
attributes: {
secure: env.PRODUCTION === true,
// @ts-expect-error only "none" works but is not included in the interface
sameSite: "none",
},
},
getUserAttributes: (attributes) => ({
verifiedAt: attributes.verifiedAt,
email: attributes.email,
}),
});
Package
lucia
Describe the bug
When creating a new lucia instance, I want to specify cookies sameSite property as "none". Everything works as expected, but when using TypeScript SessionCookieAttributesOptions only has sameSite?: "lax" | "strict" without "none" option. As a result, I get a type error, and additional user attributes( email, createdAt, etc. ) are not added to user type. So this is only a type error, as logic itself works correctly. Also not specifying sameSite or setting it to undefined is not equal to setting it to "none".