Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including passport-wpoauth with all npm packages installed. Try it out:

var passportWpoauth = require("passport-wpoauth")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

passport-wpoauth v1.2.3

Authentication strategy for Passport for Wordpress with WP-OAuth plugin.


NPM version Build Status Coverage Status Code Climate Dependency Status

A authentication strategy for Passport against a Wordpress OAuth Server.


$ npm install --save passport-wpoauth


var passport =  require('passport'),
    WPOAuthStrategy = require('passport-wpoauth');
passport.use(new WPOAuthStrategy({
  clientID: '123abc456def789ghi',
  clientSecret: 'shhh-its-a-secret',
  callbackURL: '',
  authorizationURL: '',
  tokenURL: '',
  userProfileURL: ''
  }, function(accessToken, refreshToken, profile, done) {
    User.findOrCreate(..., function(err, user) {
      done(err, user);


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using gulp.


A HUGE thanks to Jared Hanson, i used passport-github as a guideline.


Copyright (c) 2015 Thomas Lercher. Licensed under the MIT license.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free