Repository navigation
Use stored email for Identity recovery messages - #70442
Conversation
Ensure recovery and confirmation messages use the canonical address stored for the matched user, and cover alternate request casing and missing stored addresses. Co-authored-by: Copilot <[email protected]> Copilot-Session: fdac132c-0926-4fda-8c97-88ae5b59b9fd
Verify that missing stored addresses fail and do not send mail without requiring a specific error-page status code. Co-authored-by: Copilot <[email protected]> Copilot-Session: fdac132c-0926-4fda-8c97-88ae5b59b9fd
There was a problem hiding this comment.
🔵 Needs a closer look
The required frozen source-role/guidance bundle was unavailable, and CI still needs to confirm the new generated-app browser regression builds and reaches the stored-recipient and missing-email assertions.
No open issues 🎉
What changed in this PR
Aligns recovery messages in the Blazor Identity template and Identity.ExternalClaims sample with the matched user’s stored email address rather than the submitted lookup value.
Changes:
- Use stored email addresses for password-reset and confirmation messages, with guards against missing addresses.
- Add a test sender and generated-app browser coverage for differently-cased lookup addresses and missing stored email addresses.
The PR reports that local execution of the new browser test was blocked by build prerequisites; runtime validation remains pending.
| File | Description |
|---|---|
src/Security/samples/Identity.ExternalClaims/Pages/Account/ForgotPassword.cshtml.cs |
Uses the stored reset recipient and rejects missing email. |
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ResendEmailConfirmation.razor |
Uses the stored confirmation recipient and rejects missing email. |
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ForgotPassword.razor |
Uses the stored reset recipient and rejects missing email. |
src/ProjectTemplates/test/Templates.Blazor.Tests/TestAssets/CanonicalEmailTest.cs |
Adds user fixtures and a sender that records recipients. |
src/ProjectTemplates/test/Templates.Blazor.Tests/BlazorWebTemplateTest.cs |
Adds generated-app regression cases and setup helpers. |
Review effort: Balanced
|
ℹ️ This pull request wasn't processed automatically. This change requires specialized review. Please confirm whether documentation updates are needed and handle them through the appropriate process. |
Summary
Identity.ExternalClaimspassword-reset sample.This aligns these remaining template and sample flows with the canonical-address behavior publicly documented in GHSA-x3vp-85cm-q97r.
Validation
git diff --check— passed.Templates.Blazor.Testsbehavior test was added but could not be executed locally. Repository bootstrap selected MSBuild 17.15 while the repository .NET 12 SDK requires MSBuild 18.7 or newer. A direct repo-SDK attempt was subsequently blocked by unavailable generated runtime/targeting-pack assets and credential-provider startup. Normal upstream CI is required before merge.