Import users. Backed by Val Town SQLite.
Demo: @stevekrouse/lucia_middleware_demo
If you want a version that is safe to import (but not call) on the frontend:
export default luciaMiddleware(handler)
/auth/signup
, /auth/login
, /auth/logout
to trigger those flows.
Remember Response.redirect
is broken in Val Town right now, so either use links or return new Response(null, { 302, headers: { Location: "/place/to/redirect" }})
X-Lucia-Username
header, ie const username = req.headers.get("X-Lucia-Username")
By default, the middleware has very basic sign in and sign up pages. The only way to customize those right now is to fork this middleware and customize them to your liking.
Initially built by @pomdtr
Migrated from folder: Archive/lucia_middleware