/// <summary> /// Get user display name /// </summary> public static string GetUserDisplayName(this AuthenticationState state) { return(state.GetClaim(ClaimTypes.Name)); }
/// <summary> /// Get user email /// </summary> public static string GetUserEmail(this AuthenticationState state) { return(state.GetClaim("email")); }
/// <summary> /// Get user identifier (claim name sub) /// </summary> public static string GetUserIdentifier(this AuthenticationState state) { return(state.GetClaim("sub")); }