-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14442 from abpframework/VerifyPasswordResetTokenA…
…sync Invalidate the token after changing the password.
- Loading branch information
Showing
10 changed files
with
153 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
12 changes: 12 additions & 0 deletions
12
.../Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/VerifyPasswordResetTokenInput.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Volo.Abp.Account; | ||
|
||
public class VerifyPasswordResetTokenInput | ||
{ | ||
public Guid UserId { get; set; } | ||
|
||
[Required] | ||
public string ResetToken { get; set; } | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
29 changes: 20 additions & 9 deletions
29
modules/account/src/Volo.Abp.Account.Web/Pages/Account/ResetPassword.cshtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
@page | ||
@inject IHtmlLocalizer<AccountResource> L | ||
@inject IHtmlLocalizer<IdentityResource> LI | ||
@using Microsoft.AspNetCore.Mvc.Localization | ||
@using Volo.Abp.Account.Localization | ||
@using Volo.Abp.Identity.Localization | ||
@model Volo.Abp.Account.Web.Pages.Account.ResetPasswordModel | ||
@inject Volo.Abp.AspNetCore.Mvc.UI.Layout.IPageLayout PageLayout | ||
<div class="card mt-3 shadow-sm rounded"> | ||
<div class="card-body p-5"> | ||
<h4>@L["ResetPassword"]</h4> | ||
<form method="post"> | ||
<p>@L["ResetPassword_Information"]</p> | ||
<abp-input asp-for="UserId"/> | ||
<abp-input asp-for="ResetToken"/> | ||
<abp-input asp-for="Password" autocomplete="new-password" /> | ||
<abp-input asp-for="ConfirmPassword" autocomplete="new-password" /> | ||
<a abp-button="Secondary" asp-page="./Login">@L["Cancel"]</a> | ||
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value"/> | ||
</form> | ||
@if (Model.InvalidToken) | ||
{ | ||
<div class="alert alert-danger"> | ||
@LI["Volo.Abp.Identity:InvalidToken"] | ||
</div> | ||
} | ||
else | ||
{ | ||
<form method="post"> | ||
<p>@L["ResetPassword_Information"]</p> | ||
<abp-input asp-for="UserId"/> | ||
<abp-input asp-for="ResetToken"/> | ||
<abp-input asp-for="Password" autocomplete="new-password" /> | ||
<abp-input asp-for="ConfirmPassword" autocomplete="new-password" /> | ||
<a abp-button="Secondary" asp-page="./Login">@L["Cancel"]</a> | ||
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value"/> | ||
</form> | ||
} | ||
</div> | ||
</div> |
This file contains 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
This file contains 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