1.0.0 • Published 4 years ago

discauth v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

Classes

Typedefs

OAuth

Kind: global class

Constructor(client_id, client_secret, redirect, scopes)

ParamType
client_idString
client_secretString
redirectString
scopesArray.<String>

oAuth.getCode(code, type) ⇒ Promise.<Object>

Kind: instance method of OAuth

ParamTypeDescription
codeStringThe code that was in the query
typeStringCode 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}`)
        }
    )