From d2c12e85b8758ab6b8c506096073c13f95d9f686 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 24 Nov 2014 16:29:02 -0800 Subject: [PATCH] Samples fix for missing return url Fixes: https://github.com/aspnet/Identity/issues/262 --- samples/IdentitySample.Mvc/Controllers/AccountController.cs | 2 +- samples/IdentitySample.Mvc/LocalConfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/IdentitySample.Mvc/Controllers/AccountController.cs b/samples/IdentitySample.Mvc/Controllers/AccountController.cs index cdc6b95407..ee6817b0de 100644 --- a/samples/IdentitySample.Mvc/Controllers/AccountController.cs +++ b/samples/IdentitySample.Mvc/Controllers/AccountController.cs @@ -40,6 +40,7 @@ namespace IdentitySample.Models [ValidateAntiForgeryToken] public async Task 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); } } diff --git a/samples/IdentitySample.Mvc/LocalConfig.json b/samples/IdentitySample.Mvc/LocalConfig.json index 0e65b617f5..06b6876a05 100644 --- a/samples/IdentitySample.Mvc/LocalConfig.json +++ b/samples/IdentitySample.Mvc/LocalConfig.json @@ -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": {