WordPress.com OAuth2 authorization module for Node.js
JavaScript HTML CSS
Clone or download
Permalink
Failed to load latest commit information.
example Fix typo Apr 13, 2015
.gitignore
History.md update history Jun 5, 2018
LICENSE add LICENSE file Jun 6, 2014
Readme.md Add npm badge Jun 7, 2018
default.json
index.js Add .json extension when referencing default.json Mar 26, 2017
package-lock.json
package.json

Readme.md

npm version

wpcom-oauth

WordPress.com OAuth2 server-side authorization module for Node.js.

The client-side counterpart to this module is wpcom-oauth-cors.

Installation

$ npm install wpcom-oauth

API

WPOAuth#urlToConnect(resource)

Return the url that points to first step for get the access token.

WPOAuth#code(code)

Set the code to request the access token.

WPOAuth#requestAccessToken(fn)

Start the OAuth2 request to WordPress.com and execute the callback function when it's done.

Simple example application

See the example documentation to run the app

License

MIT – Copyright 2014 Automattic