lucia-auth/lucia ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple TypeScript auth session library that can replace Lucia.
I want one clean, easy to use module that handles signing users in, creating sessions, checking whether a request is authenticated, and signing out again. Keep it lightweight and practical, with the main logic in a single file if that makes sense, since this is meant to be a straightforward replacement rather than a big framework. Please include a few clear examples showing how to use it in a real app, and make sure the API feels simple enough that I can drop it into an existing project without a lot of setup.
If anything in the auth flow or session handling is unclear, look up current docs online if you need to, but keep the result focused and minimal. I’d also like the code and naming to be clean and easy to read, since the goal is a small, dependable auth package rather than something complicated.
Are you gonna build this?
make sure you review the code using coderabbit