Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(providers): Add typings for Discord Provider #4170

Merged
merged 6 commits into from Jul 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,26 @@
/** @type {import(".").OAuthProvider} */
export default function Discord(options) {
import type { OAuthConfig, OAuthUserConfig } from "."

export interface DiscordProfile extends Record<string, any> {
accent_color: number
avatar: string
banner: string
banner_color: string
discriminator: string
email: string
flags: number
id: string
image_url: string
locale: string
mfa_enabled: boolean
premium_type: number
public_flags: number
username: string
verified: boolean
}

export default function Discord<P extends DiscordProfile>(
ryanbarr marked this conversation as resolved.
Show resolved Hide resolved
options: OAuthUserConfig<P>
): OAuthConfig<P> {
return {
id: "discord",
name: "Discord",
Expand Down