diff --git a/src/BUTR.Authentication.NexusMods/Authentication/NexusModsUserInfo.cs b/src/BUTR.Authentication.NexusMods/Authentication/NexusModsUserInfo.cs index a9f78f9..d815ab9 100644 --- a/src/BUTR.Authentication.NexusMods/Authentication/NexusModsUserInfo.cs +++ b/src/BUTR.Authentication.NexusMods/Authentication/NexusModsUserInfo.cs @@ -4,8 +4,8 @@ public sealed record NexusModsUserInfo { public required uint UserId { get; init; } public required string Name { get; init; } - public required string EMail { get; init; } - public required string ProfileUrl { get; init; } + public required string? EMail { get; init; } + public required string? ProfileUrl { get; init; } public required bool IsSupporter { get; init; } public required bool IsPremium { get; init; } public required string? APIKey { get; init; } diff --git a/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsApiKeyValidator.cs b/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsApiKeyValidator.cs index 18a2e96..3ae413c 100644 --- a/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsApiKeyValidator.cs +++ b/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsApiKeyValidator.cs @@ -46,10 +46,10 @@ private sealed record NexusModsValidateResponse //public bool IsSupporter0 { get; set; } = default!; [JsonPropertyName("email")] - public string Email { get; set; } = default!; + public string? Email { get; set; } = default!; [JsonPropertyName("profile_url")] - public string ProfileUrl { get; set; } = default!; + public string? ProfileUrl { get; set; } = default!; [JsonPropertyName("is_supporter")] public bool IsSupporter { get; set; } = default!; diff --git a/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsTokenValidator.cs b/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsTokenValidator.cs index 3c7f305..51f1aa2 100644 --- a/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsTokenValidator.cs +++ b/src/BUTR.Authentication.NexusMods/Services/DefaultNexusModsTokenValidator.cs @@ -33,6 +33,7 @@ public sealed record NexusModsUserInfoResponse( [property: JsonPropertyName("sub")] string UserId, [property: JsonPropertyName("name")] string Name, [property: JsonPropertyName("email")] string? Email, + [property: JsonPropertyName("avatar")] string? AvatarUrl, [property: JsonPropertyName("membership_roles")] string[] MembershipRoles); private readonly HttpClient _httpClient; @@ -64,8 +65,8 @@ public DefaultNexusModsTokenValidator(HttpClient httpClient, IOptions