public override async Task GetProfileDataAsync(ProfileDataRequestContext context)
    {
        context.LogProfileRequest(Logger);

        if (long.TryParse(context.Subject.GetSubjectId(), out var userId))
        {
            var member = await _discordClientProvider.GetMemberAsync(userId);

            if (member is not null)
            {
                // add discord claims
                TryAddClaim(context, DiscordClaimTypes.AvatarHash, member.AvatarHash);
                TryAddClaim(context, DiscordClaimTypes.AvatarUrl, member.AvatarUrl);
                TryAddClaim(context, DiscordClaimTypes.Discriminator, member.Discriminator);
                TryAddClaim(context, DiscordClaimTypes.Username, member.Username);
                TryAddClaim(context, DiscordClaimTypes.Nickname, member.Nickname);

                // add discord role claims
                foreach (var role in member.Roles)
                {
                    TryAddClaim(context, DiscordClaimTypes.Role, role.Name);
                }

                // add app role claims
                foreach (var appRole in _discordClientProvider.GetAppRoles(member))
                {
                    TryAddClaim(context, AppClaimTypes.Role, appRole);
                }
            }
        }

        context.LogIssuedClaims(Logger);
    }
        public override async Task GetProfileDataAsync(ProfileDataRequestContext context)
        {
            await base.GetProfileDataAsync(context);

            //context.IssuedClaims.AddRange(context.Subject.Claims.Where(claim => claim.Type.StartsWith(DiscordClaimTypes.ClaimPrefix)));

            if (long.TryParse(context.Subject.GetSubjectId(), out var userId))
            {
                // add character and raid leader claims
                var claims = await _context.UserClaims
                             .AsNoTracking()
                             .Where(claim => claim.UserId == userId && claim.ClaimValue != null && (claim.ClaimType == AppClaimTypes.Character || claim.ClaimType == AppClaimTypes.RaidLeader))
                             .Select(claim => new Claim(claim.ClaimType, claim.ClaimValue))
                             .ToListAsync();

                context.IssuedClaims.AddRange(claims);

                var member = await _discordClientProvider.GetMemberAsync(userId);

                if (member is not null)
                {
                    // add discord claims
                    TryAddClaim(context, DiscordClaimTypes.AvatarHash, member.AvatarHash);
                    TryAddClaim(context, DiscordClaimTypes.AvatarUrl, member.AvatarUrl);
                    TryAddClaim(context, DiscordClaimTypes.Discriminator, member.Discriminator);
                    TryAddClaim(context, DiscordClaimTypes.Username, member.Username);

                    // add discord role claims
                    foreach (var role in member.Roles)
                    {
                        TryAddClaim(context, DiscordClaimTypes.Role, role.Name);
                    }

                    // add app role claims
                    foreach (var appRole in _discordClientProvider.GetAppRoles(member))
                    {
                        TryAddClaim(context, AppClaimTypes.Role, appRole);
                    }
                }
            }
        }