Clean up SignIn action

This commit is contained in:
David Fowler 2023-05-08 00:29:30 -07:00 committed by Reuben Bond
parent 184ed15ef6
commit bdebee70dc

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