diff --git a/.auri/$10bcw0d7.md b/.auri/$10bcw0d7.md new file mode 100644 index 000000000..d46eeb030 --- /dev/null +++ b/.auri/$10bcw0d7.md @@ -0,0 +1,5 @@ +--- +package: "@lucia-auth/oauth" +type: "patch" +--- +Fix `DiscordUser` \ No newline at end of file diff --git a/documentation/content/oauth/providers/discord.md b/documentation/content/oauth/providers/discord.md index ba2037759..3dc643d7c 100644 --- a/documentation/content/oauth/providers/discord.md +++ b/documentation/content/oauth/providers/discord.md @@ -85,20 +85,20 @@ type DiscordUser = { id: string; username: string; discriminator: string; - global_name?: string; - avatar: string; + global_name: string | null; + avatar: string | null; bot?: boolean; system?: boolean; mfa_enabled?: boolean; verified?: boolean; - email?: string; + email?: string | null; flags?: number; - banner?: string; - accent_color?: number; + banner?: string | null; + accent_color?: number | null; premium_type?: number; public_flags?: number; locale?: string; - avatar_decoration?: string; + avatar_decoration?: string | null; }; ``` diff --git a/packages/oauth/src/providers/discord.ts b/packages/oauth/src/providers/discord.ts index e285afd62..c8ba17500 100644 --- a/packages/oauth/src/providers/discord.ts +++ b/packages/oauth/src/providers/discord.ts @@ -120,18 +120,18 @@ export type DiscordUser = { id: string; username: string; discriminator: string; - global_name?: string; - avatar: string; + global_name: string | null; + avatar: string | null; bot?: boolean; system?: boolean; mfa_enabled?: boolean; verified?: boolean; - email?: string; + email?: string | null; flags?: number; - banner?: string; - accent_color?: number; + banner?: string | null; + accent_color?: number | null; premium_type?: number; public_flags?: number; locale?: string; - avatar_decoration?: string; + avatar_decoration?: string | null; };