1.0.0 • Published 4 years ago
discauth v1.0.0
Classes
Typedefs
OAuth
Kind: global class
Constructor(client_id, client_secret, redirect, scopes)
Param | Type |
---|---|
client_id | String |
client_secret | String |
redirect | String |
scopes | Array.<String> |
oAuth.getCode(code, type) ⇒ Promise.<Object>
Kind: instance method of OAuth
Param | Type | Description |
---|---|---|
code | String | The code that was in the query |
type | String | Code type. Can be authorization or redirect . It's authorzation by default. |
Example
oauth.getCode(queryCode, "authorization")
.then(noauthInfo => {
console.log(`Your auth code is ${authInfo.authorization_token}`)
}
)
1.0.0
4 years ago