Friday, June 26, 2015

Implementing the Authorization Handling in Node.js

The code implements two API end points. Implementation can be found at https://github.com/larkintuckerllc/meanwp.

GET /login

This simply redirects the browser to correct WordPress authorization endpoint.

GET /authorize?code=XXXX

This is the WordPress callback that
  1. Accepts the authorization code
  2. Contacts WordPress to trade the authorization code for an access token
  3. Redirect the browser back to /?token=XXXX

No comments:

Post a Comment