Created
September 26, 2021 11:26
-
-
Save garraflavatra/7a3b76b243d26815301b0e95e2559100 to your computer and use it in GitHub Desktop.
ASP.NET Core: get current user's ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Identity; | |
string UserID = User.FindFirstValue(ClaimTypes.NameIdentifier); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment