Skip to content

Instantly share code, notes, and snippets.

@fmshk97
Created February 21, 2021 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmshk97/7687a1bc1931b941c750564a181c455f to your computer and use it in GitHub Desktop.
Save fmshk97/7687a1bc1931b941c750564a181c455f to your computer and use it in GitHub Desktop.
Logout API in AccountsController
[HttpGet]
[Authorize]
public async Task<IActionResult> Details()
{
var loggedInUserId = User.FindFirst(ClaimTypes.NameIdentifier).Value;
return Ok(await _userManager.FindByIdAsync(loggedInUserId));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment