Samples fix for missing return url
Fixes: https://github.com/aspnet/Identity/issues/262
This commit is contained in:
parent
d4733f9238
commit
d2c12e85b8
|
|
@ -40,6 +40,7 @@ namespace IdentitySample.Models
|
|||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl = null)
|
||||
{
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var signInStatus = await SignInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, shouldLockout: false);
|
||||
|
|
@ -55,7 +56,6 @@ namespace IdentitySample.Models
|
|||
case SignInStatus.Failure:
|
||||
default:
|
||||
ModelState.AddModelError("", "Invalid username or password.");
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"DefaultAdminPassword": "YouShouldChangeThisPassword1!",
|
||||
"Data": {
|
||||
"IdentityConnection": {
|
||||
"Connectionstring": "Server=(localdb)\\mssqllocaldb;Database=IdentityMvc-8-12-14;Trusted_Connection=True;MultipleActiveResultSets=true"
|
||||
"Connectionstring": "Server=(localdb)\\mssqllocaldb;Database=IdentityMvc-11-24-14;Trusted_Connection=True;MultipleActiveResultSets=true"
|
||||
}
|
||||
},
|
||||
"Identity": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue