discauth

1.0.0 • Public • Published

Classes

OAuth

Typedefs

OAuth

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}`)
        }
    )

Readme

Keywords

Package Sidebar

Install

npm i discauth

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

5.09 kB

Total Files

3

Last publish

Collaborators

  • sardonyx