Improve default Identity email wording for recipients who didn't initiate the action#66747
Open
GrantTotinov wants to merge 2 commits into
Open
Improve default Identity email wording for recipients who didn't initiate the action#66747GrantTotinov wants to merge 2 commits into
GrantTotinov wants to merge 2 commits into
Conversation
Contributor
|
Thanks for your PR, @GrantTotinov. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the built-in ASP.NET Core Identity email templates to add guidance for recipients who didn’t initiate an action, improving clarity and reducing confusion for unsolicited emails.
Changes:
- Appends an “ignore this email if you didn’t initiate” sentence to the default email confirmation and password reset messages.
- Applies the same wording improvement to the Identity.ExternalClaims sample’s email helper extensions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Shared/DefaultMessageEmailSender.cs | Updates default Identity confirmation/reset email bodies to include an “ignore if not initiated” follow-up sentence. |
| src/Security/samples/Identity.ExternalClaims/Extensions/EmailSenderExtensions.cs | Updates sample email confirmation/reset message bodies to include the same follow-up sentence. |
|
|
||
| public Task SendConfirmationLinkAsync(TUser user, string email, string confirmationLink) => | ||
| emailSender.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by <a href='{confirmationLink}'>clicking here</a>."); | ||
| emailSender.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by <a href='{confirmationLink}'>clicking here</a>. If you didn't create an account, you can ignore this email."); |
| { | ||
| return emailSender.SendEmailAsync(email, "Confirm your email", | ||
| $"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(link)}'>clicking here</a>."); | ||
| $"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(link)}'>clicking here</a>. If you didn't create an account, you can ignore this email."); |
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.
Improve default Identity email wording for recipients who didn't initiate the action
Description
Adds a follow-up sentence to the default confirmation and password-reset emails
to inform recipients who did not initiate the action that they can safely ignore the email.
Note: The issue mentions
src/Identity/UI/src/Services/EmailSenderExtensions.csbut this file does not exist in the repository. Verified against upstream/main.
Only the two existing files were updated.
Fixes #66643