Replies: 1 comment
-
Can you open an issue for that? That shouldn't be happening.
There was an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a very cool project, excellent work! Having lower-level control over the authentication and authorization flow without working around a built-in UI layer is extremely helpful as a project scales past the most basic OAuth flow!
I'm torn on this idea myself - each middleware is so small it feels like a shame to spin up totally separate packages for them!
Why?
I was testing out the Astro middleware recently and ran into a typing error, specifically related to a mismatch in Astro's built-in
AstroCookies
type compared to the cookies type used in Lucia. I don't have it in front of me at the moment, but it was effectively a mismatch where one was expectingstring | undefined
and the other expectednull
as wellA separate
@lucia-auth/astro
package might simplify the typings a bit since it could depend on theastro
package and use Astro'sAPIContext
type directly. Lucia's cookies type is used by all supported frameworks and may run into mismatches where cookies APIs work slightly differently in the various frameworks.Alternatives
There may very well be a more simple solution that I haven't tested out yet. Would including
astro
as an optional peer dependency allow the current middleware to use the framework-specific type?Beta Was this translation helpful? Give feedback.
All reactions