-
Notifications
You must be signed in to change notification settings - Fork 15
Revise password reset confirmation text and email template #2153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rc
Are you sure you want to change the base?
Conversation
Rc v4.0.0
Rc v4.0.2
Rc v4.0.2
#2106 fix issue in metadata form showing package usages that have mor…
|
@geofranzi 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: geofranzi <[email protected]>
|
@copilot the branch for the issues is based on master, but it needs to be the rc and the merge request needs to go to the rc as well |
You're absolutely right! I understand that the branch should be based on I've identified the issue: my current branch However, I'm unable to directly rebase the branch or create a new remote branch targeting
The changes are minimal and only affect two files:
Which approach would you prefer? |
|
@copilot use option 3 |
I'll provide the exact changes needed for a fresh rc-based branch. Here are the two files that need to be modified: File 1: Console/BExIS.Web.Shell/Controllers/AccountController.csIn the await identityUserService.SendEmailAsync(user.Id, "Reset Password", "Please reset your password by clicking <a href=\"" + callbackUrl + "\">here</a>");With this professional HTML email template: // Create professional email template
var displayName = !string.IsNullOrEmpty(user.DisplayName) ? user.DisplayName : user.UserName;
var applicationName = BExIS.Utils.Config.GeneralSettings.ApplicationName;
if (string.IsNullOrEmpty(applicationName)) applicationName = "BEXIS2";
var emailBody = $@"
<html>
<body style='font-family: Arial, sans-serif; color: #333;'>
<p>Dear {displayName},</p>
<p>We received a request to reset the password for your account.</p>
<p>If you made this request, please reset your password by following the secure link below:</p>
<p style='margin: 20px 0;'>
<a href='{callbackUrl}' style='background-color: #007bff; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; display: inline-block;'>Reset your password</a>
</p>
<p>If you did not request a password reset, you can safely ignore this message. Your account will remain unchanged.</p>
<p>Best regards,<br>
Your {applicationName} Support Team</p>
</body>
</html>";
await identityUserService.SendEmailAsync(user.Id, "Reset Password", emailBody);File 2: Console/BExIS.Web.Shell/Views/Account/ForgotPasswordConfirmation.cshtmlUpdate the ViewBag.Title and messaging for security-conscious language: @{
ViewBag.Title = "Password Reset Request Submitted";
}
@section Information
{
If an account with your email exists, we've sent instructions to reset your password. Please check your inbox (and your spam folder).
}
<hgroup class="title">
<h1>@ViewBag.Title.</h1>
</hgroup>
<div>
<p>
If an account with your email exists, we've sent instructions to reset your password. Please check your inbox (and your spam folder).
</p>
</div>These changes implement the professional email template and security-conscious UI messaging that doesn't reveal account existence. |
This PR improves the password reset user experience by updating both the confirmation page text and email template to be more professional and security-conscious.
Changes Made
Updated Confirmation Page
Enhanced Email Template
Replaced the simple text email with a professional HTML template that includes:
Security Improvements
Example Email Output
The implementation includes proper fallback logic for missing configuration values and maintains backward compatibility with existing functionality.
Fixes #2152.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.