A tiny authentication recipe, with basic session management. Main libs used: Hono, Handlebars
Requires bun >= 1.0
Create .env file at the root folder of the project with the following content:
BASE_URL=http://localhost:3000/
# EMAIL_USE_CREDENTIALS if false, it will generate an ethereal test account on the fly
EMAIL_USE_CREDENTIALS=TRUE
# generate an account on https://ethereal.email/create and paste the data here:
EMAIL_HOST=smtp.ethereal.email
EMAIL_PORT=587
EMAIL_SECURITY=STARTTLS
EMAIL_SECURE=false
EMAIL_USER=rosanna18@ethereal.email
EMAIL_PASSWORD=zDMYGD2kfPTrPVxbxV
bun install
bun run dev:css
bun run dev:server
browse http://localhost:3000
-
forgot password flow (UI, signed token)
-
verify email
-
view user
-
view roles
-
assign roles to user