Kind: global class
-
OAuth
- new OAuth(client_id, client_secret, redirect, scopes)
-
.getCode(code, [type]) ⇒
Promise.<Object>
Param | Type |
---|---|
client_id | String |
client_secret | String |
redirect | String |
scopes | Array.<String> |
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}`)
}
)