Skip to content

commandp/oauth2-node

Repository files navigation

OAuth2 client for node.js

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

Usage

importOAuth2from'oauth2-node'constclientConfig={site: HOST}constclient=newOAuth2.Client(APP_ID,SECRET,clientConfig)constauthURL=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