Send magic links through SMTP email #198
No reviewers
Labels
No labels
activitypub
admin
api
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
database
deployment
design
dev-env
docs
documentation
email
enhancement
feature
federation
feed
homepage
implementation
integration
media
openapi
priority:high
priority:low
priority:medium
proof
public-routes
public-ui
release
safety
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!198
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-bf36a41f-smtp-magic-links"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add SMTP-backed magic-link email delivery for production sites while preserving dev-mode log output.
Task
Task: #task-bf36a41f
Changes
nodemailer.AUTH_DEV_MODE=truelog-output behavior with no SMTP requirement.delivery-not-configuredpath so no magic link is created silently..env.exampleand template setup docs.Testing
Verification:
npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/auth/__tests__/delivery.test.ts src/auth/__tests__/magic-links.test.ts src/routes/__tests__/auth.test.ts./scripts/pre-pr.shnpm run build && npm run lint && npm testChecklist
./scripts/pre-pr.shpassesPR Review: Approved
Summary: SMTP-backed magic-link delivery is implemented in scope. The changes add environment-based SMTP configuration, preserve dev-mode log delivery, fail clearly before creating a magic-link row when required SMTP config is absent/invalid, and update docs/tests.
Acceptance criteria:
createMagicLinkDeliverybuilds a Nodemailer transport from SMTP env config and sends text/html magic-link mail.AUTH_DEV_MODE=truestill logs the magic link and does not require SMTP — dev-mode branch returns the existing log delivery path and is covered by tests.MagicLinkDeliveryNotConfiguredError,createMagicLinkreturnsdelivery-not-configured, and tests assert no DB row is created.SMTP_HOST,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORD,SMTP_SECURE,SMTP_FROM_EMAIL, andSMTP_FROM_NAMEare parsed and documented..env.exampleand setup documentation explain SMTP configuration and magic-link delivery — updated intemplate/site/.env.exampleandtemplate/site/README.md.Verification reviewed:
npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/auth/__tests__/delivery.test.ts src/auth/__tests__/magic-links.test.ts src/routes/__tests__/auth.test.ts(3 files, 23 tests)../scripts/pre-pr.sh(format, lint, typecheck, all workspace tests: 49 files, 369 tests).a322fd6685(build-lint-test, pull_request).Blocking issues: none.
Warnings: none.
Final verdict: approved. Do not merge until explicit human merge approval.
PR review completed for task
task-bf36a41fafter update9f2d44d.Result: approved
Acceptance criteria: 6/6 met, 0 missing.
Verification:
9f2d44d.AUTH_DEV_MODE=falsenow forces SMTP delivery even whenNODE_ENVis non-production.NODE_ENV=development.npm exec --workspace @slugkit/template-site -- vitest run --config ../../vitest.config.ts src/auth/__tests__/delivery.test.ts src/auth/__tests__/magic-links.test.ts src/routes/__tests__/auth.test.ts(3 files, 23 tests)../scripts/pre-pr.sh(format, lint, typecheck, all workspace tests: 49 files, 369 tests).9f2d44d(build-lint-test, pull_request).Blocking issues: none.
Warnings: none.
Merge gate: waiting for explicit human merge approval.
PR Review Worker Result