Browse Source

Clean up SignIn action

davidfowl/common-services
David Fowler 1 year ago
committed by Reuben Bond
parent
commit
bdebee70dc
1 changed files with 2 additions and 10 deletions
  1. +2
    -10
      src/Web/WebMVC/Controllers/AccountController.cs

+ 2
- 10
src/Web/WebMVC/Controllers/AccountController.cs View File

@ -11,17 +11,9 @@ public class AccountController : Controller
}
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public async Task<IActionResult> SignIn(string returnUrl)
public IActionResult SignIn(string returnUrl)
{
var user = User as ClaimsPrincipal;
var token = await HttpContext.GetTokenAsync("access_token");
_logger.LogInformation("User {@User} authenticated", user);
if (token != null)
{
ViewData["access_token"] = token;
}
_logger.LogInformation("User {@User} authenticated", User.Identity.Name);
// "Catalog" because UrlHelper doesn't support nameof() for controllers
// https://github.com/aspnet/Mvc/issues/5853


Loading…
Cancel
Save