discord-passport

1.0.0

Passport

Creates a new passport flow.

Passport
Parameters
options (object) Passport options
Name Description
options.code string The code returned from the oauth flow.
options.state string? The state to pass through the flow.
options.client_id string The client_id for authorization.
options.client_secret string The client_secret for authorization.
options.redirect_uri string The redirect_uri for authorization.
options.scope array The scopes requested in your authorization url.
Properties
token (string) : The access token.
refresh_token (string) : The refresh access token.
token_type (string) : The type of access token.
expires_in (string) : The time in milliseconds till the access token expires.
connections (array) : A list of this user's connections, requires the connections .
guilds (array) : A list of this user's guilds, with limited information, requires the guilds scope.
user (object) : Information about this user, requires the identify scope.
  • user.id string

    The users ID.

  • user.username string

    The user's username.

  • user.discriminator string

    The user's discriminator.

  • user.avatar string?

    The user's avatar hash.

  • user.bot boolean

    Whether the user belongs to an Oauth2 application.

  • user.system boolean

    Whether the user is an Official Discord System user (part of the urgent message system)

  • user.mfa_enabled boolean

    Whether the user has two factor enabled on their account.

  • user.locale string?

    The user's chosen language option.

  • user.verified boolean?

    Whether the email on this account has been verified.

  • user.email string?

    The user's email, requires the email scope.

  • user.flags integer?

    The flags on a user's account.

  • user.premium_type integer?

    The type of Nitro subscription on a user's account.

  • user.public_flags integer?

    The public flags on a user's account.

Instance Members
open()
refresh()