Пример #1
0
        public async Task <Auth0UserDto> GetAsync(string userId)
        {
            var httpClient = await _auth0Client.GetAuthenticatedClientAsync();

            using var httpResponse = await httpClient.GetAsync($"api/v2/users/{userId}");

            var responseAsString = await httpResponse.Content.ReadAsStringAsync();

            var auth0User = JsonConvert.DeserializeObject <Auth0UserDto>(responseAsString);

            return(auth0User);
        }