diff --git a/src/MusicStore/Controllers/ManageController.cs b/src/MusicStore/Controllers/ManageController.cs index b6f21021db..2faf857601 100644 --- a/src/MusicStore/Controllers/ManageController.cs +++ b/src/MusicStore/Controllers/ManageController.cs @@ -163,6 +163,8 @@ namespace MusicStore.Controllers // // GET: /Account/RemovePhoneNumber + [HttpPost] + [ValidateAntiForgeryToken] public async Task RemovePhoneNumber() { var user = await GetCurrentUserAsync(); @@ -172,10 +174,10 @@ namespace MusicStore.Controllers if (result.Succeeded) { await SignInManager.SignInAsync(user, isPersistent: false); - return RedirectToAction("Index", new { Message = ManageMessageId.RemovePhoneSuccess }); + return RedirectToAction(nameof(Index), new { Message = ManageMessageId.RemovePhoneSuccess }); } } - return RedirectToAction("Index", new { Message = ManageMessageId.Error }); + return RedirectToAction(nameof(Index), new { Message = ManageMessageId.Error }); } // diff --git a/src/MusicStore/Views/Manage/Index.cshtml b/src/MusicStore/Views/Manage/Index.cshtml index a99a723f44..79a2d97ddb 100644 --- a/src/MusicStore/Views/Manage/Index.cshtml +++ b/src/MusicStore/Views/Manage/Index.cshtml @@ -1,97 +1,70 @@ @model IndexViewModel @{ - ViewBag.Title = "Manage your account"; + ViewData["Title"] = "Manage your account"; } -

@ViewBag.Title.

+

@ViewData["Title"].

+

@ViewData["StatusMessage"]

-

@ViewBag.StatusMessage

Change your account settings


Password:
- [ @if (Model.HasPassword) { - Change + [  Change  ] } else { - Create + [  Create  ] } - ]
External Logins:
- @Model.Logins.Count [Manage] + @Model.Logins.Count [  Manage  ]
- @* - Phone Numbers can used as a second factor of verification in a two-factor authentication system. - - See this article - for details on setting up this ASP.NET application to support two-factor authentication using SMS. - - Uncomment the following block after you have set up two-factor authentication - *@ -
Phone Number:
- @(Model.PhoneNumber ?? "None") [ - @if (Model.PhoneNumber != null) - { - Change - @:  |  - Remove - } - else - { - Add - } - ] +

+ Phone Numbers can used as a second factor of verification in two-factor authentication. + See this article + for details on setting up this ASP.NET application to support two-factor authentication using SMS. +

+ @*@(Model.PhoneNumber ?? "None") + @if (Model.PhoneNumber != null) + { +
+ [  Change  ] +
+ [] +
+ } + else + { + [  Add  ] + }*@
+
Two-Factor Authentication:
- @if (Model.TwoFactor) - { -
-

- Enabled - -

-
- } - else - { -
-

- Disabled - -

-
- } -
-
Browser remembered:
-
- @if (Model.BrowserRemembered) - { -
-

- Browser is curently remembered for two factor: - -

-
- } - else - { -
-

- Browser is curently not remembered for two factor: - -

-
- } +

+ There are no two-factor authentication providers configured. See this article + for setting up this application to support two-factor authentication. +

+ @*@if (Model.TwoFactor) + { +
+ Enabled [] +
+ } + else + { +
+ [] Disabled +
+ }*@
\ No newline at end of file