Solve problem in register process (when not auth user click login in web mvc and the users register before authentication takes place)

This commit is contained in:
Carlos Cañizares Estévez 2016-12-14 14:31:55 +01:00
parent 7ba1c339c4
commit 373946b5c6

View File

@ -297,7 +297,10 @@ namespace IdentityServer4.Quickstart.UI.Controllers
}
if (returnUrl != null) {
return Redirect(returnUrl);
if (HttpContext.User.Identity.IsAuthenticated)
return Redirect(returnUrl);
else
return RedirectToAction("login", "account", new { returnUrl = returnUrl });
}
return RedirectToAction("index", "home");