Skip to content

Add email verification and one-click notification unsubscribe#360

Merged
simonhamp merged 2 commits intomainfrom
one-click-unsubscribe
Apr 13, 2026
Merged

Add email verification and one-click notification unsubscribe#360
simonhamp merged 2 commits intomainfrom
one-click-unsubscribe

Conversation

@simonhamp
Copy link
Copy Markdown
Member

@simonhamp simonhamp commented Apr 13, 2026

Summary

  • Email verification: Re-enables MustVerifyEmail on the User model and fires the Registered event on registration so new users receive a verification email. A non-blocking banner on the Dashboard prompts unverified users to verify, with a button to resend the verification link. No functionality is gated behind verification.
  • One-click notification unsubscribe: Adds signed URL-based unsubscribe/resubscribe links for notification emails, with dedicated controller and confirmation pages.
  • SuppressMailNotificationListener fix: System notifications like VerifyEmail now bypass the notification preference check so they're always delivered. Also fixes a null-to-bool return type issue.
  • Admin cleanup: Removes the email_verified_at field from the Filament admin user edit form since it's not useful when verification doesn't gate functionality.

Test plan

  • Run php artisan test --compact tests/Feature/Auth/EmailVerificationTest.php — 11 tests covering registration sends verification, link verification, resend, invalid signatures, dashboard banner visibility
  • Run php artisan test --compact tests/Feature/NotificationUnsubscribeTest.php — tests for unsubscribe/resubscribe flows
  • Run php artisan test --compact tests/Feature/Auth/AuthPagesTest.php — existing auth tests still pass
  • Run php artisan test --compact tests/Feature/Filament/ — admin tests still pass
  • Verify unverified users see the verification banner on the dashboard
  • Verify verified users do not see the banner

🤖 Generated with Claude Code

simonhamp and others added 2 commits April 13, 2026 15:05
- Re-enable MustVerifyEmail on User model and fire Registered event on registration
- Add EmailVerificationController with verification routes (notice, verify, resend)
- Add persistent dashboard banner prompting unverified users to verify email
- Add one-click unsubscribe/resubscribe via signed URLs in notification emails
- Update SuppressMailNotificationListener to always allow system emails (e.g. VerifyEmail)
- Remove email_verified_at field from admin user edit form
- Add comprehensive tests for email verification and notification unsubscribe flows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review April 13, 2026 14:19
@simonhamp simonhamp merged commit 6d6c738 into main Apr 13, 2026
2 checks passed
@simonhamp simonhamp deleted the one-click-unsubscribe branch April 13, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant