Skip to content

commandp/oauth2-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OAuth2 client for node.js

a simple port of https://github.com/intridea/oauth2.

Usage

import OAuth2 from 'oauth2-node'

const clientConfig = {
  site: HOST
}

const client = new OAuth2.Client(APP_ID, SECRET, clientConfig)

const authURL = client.authCode().getAuthorizeURL({ redirect_uri: '/oauth/callback' })
client.authCode().getToken('code', redirect_uri).then(token => ...)

client.password().getToken('username', 'password').then(token => ...)

client.clientCredentials().getToken().then(token => ...)

client.assertion().getToken(params).then(token => ...)

License

MIT

About

OAuth2 client for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published