Passport Node.js Client

Node.js Client Library

The Node.js client library allows you to integrate Passport with your Node application.

Source Code:

NPM Package:

To install the Passport Node Client package run:

$ npm install passport-node-client

Here is an example of using the PassportClient to retrieve a User by their email address via the Passport User API:

const PassportClient = require('../src/PassportClient');
const client = new PassportClient('6b87a398-39f2-4692-927b-13188a81a9a3', 'http://passport.local');

// Retrieve User by Email Address
client.retrieveUserByEmail('user@example.com')
       .then(handleResponse);

function handleResponse (clientResponse) {
  console.info(JSON.stringify(clientResponse.successResponse.user, null, 2));
}