mirror of
https://github.com/btouchard/ackify.git
synced 2026-02-12 08:49:47 -06:00
Add authentication tokens embedded in reminder emails allowing users to authenticate and sign documents in one click. Changes: - Add 'purpose' (login/reminder_auth) and 'doc_id' columns to magic_link_tokens - Implement CreateReminderAuthToken (24h validity) and VerifyReminderAuthToken - Create reminder auth handler and route (/api/v1/auth/reminder-link/verify) - Update ReminderService and ReminderAsyncService to generate auth tokens - Fix table name mismatch: magic_links → magic_link_tokens throughout - Reorder service initialization in server.go for proper dependencies Token validity: - Magic Link: 15 minutes (login) - Reminder Auth: 24 hours (document signature) The reminder auth flow: 1. Admin sends reminder 2. User receives email with auth link 3. User clicks link → auto-authenticated if not logged in 4. User redirected to document signature page 5. If already authenticated with correct account, skip auth step