Creates a new passport flow.
(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. |
(string)
: The access token.
(string)
: The refresh access token.
(string)
: The type of access token.
(string)
: The time in milliseconds till the access token expires.
(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.