Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit bdebee7

Browse files
davidfowlReubenBond
authored andcommitted
Clean up SignIn action
1 parent 184ed15 commit bdebee7

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Web/WebMVC/Controllers/AccountController.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,9 @@ public AccountController(ILogger<AccountController> logger)
1111
}
1212

1313
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
14-
public async Task<IActionResult> SignIn(string returnUrl)
14+
public IActionResult SignIn(string returnUrl)
1515
{
16-
var user = User as ClaimsPrincipal;
17-
var token = await HttpContext.GetTokenAsync("access_token");
18-
19-
_logger.LogInformation("User {@User} authenticated", user);
20-
21-
if (token != null)
22-
{
23-
ViewData["access_token"] = token;
24-
}
16+
_logger.LogInformation("User {@User} authenticated", User.Identity.Name);
2517

2618
// "Catalog" because UrlHelper doesn't support nameof() for controllers
2719
// https://github.com/aspnet/Mvc/issues/5853

0 commit comments

Comments
 (0)