protected virtual async Task <IEnumerable <Claim> > GetClaimsFromAccount(TUser user)
        {
            var userId = await _userManager.GetUserIdAsync(user).ConfigureAwait(false);

            var userName = await _userManager.GetUserNameAsync(user).ConfigureAwait(false);

            var claims = new List <Claim> {
                new Claim(Constants.ClaimTypes.Subject, userId),
                new Claim(Constants.ClaimTypes.PreferredUserName, userName),
            };

            if (_userManager.SupportsUserEmail)
            {
                var email = await _userManager.GetEmailAsync(user).ConfigureAwait(false);

                if (!string.IsNullOrWhiteSpace(email))
                {
                    claims.Add(new Claim(Constants.ClaimTypes.Email, email));
                    var verified = await _userManager.IsEmailConfirmedAsync(user).ConfigureAwait(false);

                    claims.Add(new Claim(Constants.ClaimTypes.EmailVerified, verified ? "true" : "false"));
                }
            }

            if (_userManager.SupportsUserPhoneNumber)
            {
                var phone = await _userManager.GetPhoneNumberAsync(user).ConfigureAwait(false);

                if (!string.IsNullOrWhiteSpace(phone))
                {
                    claims.Add(new Claim(Constants.ClaimTypes.PhoneNumber, phone));
                    var verified = await _userManager.IsPhoneNumberConfirmedAsync(user);

                    claims.Add(new Claim(Constants.ClaimTypes.PhoneNumberVerified, verified ? "true" : "false"));
                }
            }

            if (_userManager.SupportsUserClaim)
            {
                claims.AddRange(await _userManager.GetClaimsAsync(user).ConfigureAwait(false));
            }

            if (_userManager.SupportsUserRole)
            {
                var roleClaims =
                    from role in await _userManager.GetRolesAsync(user).ConfigureAwait(false)
                    select new Claim(Constants.ClaimTypes.Role, role);

                claims.AddRange(roleClaims);
            }

            return(claims);
        }