pnpm i
Migrate Prisma schema:
pnpm prisma migrate dev --name init
Create a Github OAuth app and copy-paste client id and secret into .env
.
pnpm dev
If you're using Node.js (v18 or below) for development or production, a polyfill is required! Replace astro dev
with NODE_OPTIONS=--experimental-global-webcrypto astro dev
etc in package.json or import lucia-auth/polyfill/node
in lib/lucia.ts
:
import "lucia-auth/polyfill/node";
export const auth = lucia({
// ...
});