I'm currently working on integrating Lucia and Oslo with a Hono API and noticed the typing for the SameSite in the Cookie is not compatible with one used by Hono, when looking at the documentation on MDN website it seems that Hono are using the same one as MDN documentation.
Argument of type '{ secure?: boolean; path?: string; domain?: string; sameSite?: "lax" | "strict" | "none"; httpOnly?: boolean; maxAge?: number; expires?: Date; }' is not assignable to parameter of type 'CookieOptions'.
Types of property 'sameSite' are incompatible.
Type '"lax" | "strict" | "none"' is not assignable to type '"Lax" | "Strict" | "None"'.
Type '"lax"' is not assignable to type '"Lax" | "Strict" | "None"'. Did you mean '"Lax"'?
I'm currently working on integrating Lucia and Oslo with a Hono API and noticed the typing for the SameSite in the Cookie is not compatible with one used by Hono, when looking at the documentation on MDN website it seems that Hono are using the same one as MDN documentation.
Example
This gives a type error :
And forced to do this instead:
Suggested change Change the typing to be in uppercase :
sameSite?: "None" | "Lax" | "Strict"
References :
If it's alright with you, I can create a PR to fix this issue