Notify old email when email change is requested#1484
Open
Conversation
Security measure: when a user requests an email change, send an alert to their current (old) email so they can flag unauthorized changes. Also removes the unused account_email_changed notification kind since that moment is already tracked via Ahoy (auth.email_changed) and notifications should represent emails actually sent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies the new account_email_change_requested_notification kind routes correctly through NotificationMailerJob and persists the delivered email. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update tests to reference account_email_change_requested_notification instead of the removed account_email_changed kind. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jmilljr24
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR and why is this important?
How did you approach the change?
account_email_change_requested_notificationnotification kindNotificationMailer#account_email_change_requested_notificationwith a template that warns the old email and links to contact supportafter_commit :notify_old_email_of_change_requeston User, triggered whenunconfirmed_emailis setNotificationMailerJob's mailer mapaccount_email_changednotification kind — it haddeliver: false(no email sent), and the same moment is already tracked via Ahoy (auth.email_changed)UI Testing Checklist
Anything else to add?
account_email_changedwas removed because notifications represent emails sent, and this kind never sent one — the Ahoy eventauth.email_changedalready covers audit needs🤖 Generated with Claude Code