Browse Source

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

pull/49/merge
Carlos Cañizares Estévez 8 years ago
parent
commit
373946b5c6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs

+ 4
- 1
src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs 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");


Loading…
Cancel
Save