Add admin magic-link login and sessions #58
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!58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-8af07ab8-admin-magic-link-sessions"
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
admin_magic_linksandadmin_sessionsSQLite migration./login,/login/verify,/logout, and protected/adminroutes.Testing
make check./scripts/pre-pr.shGET /loginreturns 200 and anonymousGET /adminredirects to/login.Task: #task-8af07ab8
PR Review: Approved
Summary
Reviewed PR #58 at commit
0b75a6a. The PR implements the magic-link bootstrap slice:ADMIN_EMAILis the owner allow-list, magic-link tokens are hashed, expiring, and single-use, development delivery logs the link, production delivery fails closed when not configured, server-side sessions and cookies are added, and/login,/login/verify,/logout, and protected/adminroutes are wired with tests.Acceptance Criteria
GET /loginrenders an email login form.POST /logincreates a hashed, expiring, single-use magic-link record and exposes the raw link only through dev logging or the configured delivery boundary.POST /logindoes not create a usable magic link and does not reveal authorization status to the requester.GET /login/verifywith a valid token creates a server-side session and sets a secure cookie.GET /adminredirects anonymous users to/login.GET /adminsucceeds for authenticated owner sessions.make check,./scripts/pre-pr.sh, manual smoke, and Forgejo CI passed.Blocking Issues
None.
Warnings
None.
Verdict
Approved for merge.
PR Review: Approved (updated)
Summary
Reviewed updated PR #58 through commit
ec095f4. The PR now includes the original magic-link/session bootstrap plus the follow-up fixes found during manual testing: startup migrations run before serving, default admin email falls back toadmin@slugkit.com, dev startup logs show the effective admin email, auth lifecycle events are logged, and runtime SQLite data is ignored.Acceptance Criteria
GET /loginrenders an email login form.POST /logincreates a hashed, expiring, single-use magic-link record and exposes the raw link only through dev logging or the configured delivery boundary.POST /logindoes not create a usable magic link and does not reveal authorization status to the requester.GET /login/verifywith a valid token creates a server-side session and sets a secure cookie.GET /adminredirects anonymous users to/login.GET /adminsucceeds for authenticated owner sessions.make check,./scripts/pre-pr.sh, manual login smoke, and Forgejo CI passed.Additional Verification
ADMIN_EMAIL=admin@slugkit.comwhen unset.data/paths are ignored.Blocking Issues
None.
Warnings
None.
Verdict
Approved for merge.