node package manager


Playlyfe passport authentication strategy for NodeJS


Passport strategy for authenticating with the Playlyfe Platform

This module lets you authenticate using Playlyfe in your Node.js applications.

For accesing the complete Playlyfe API it is recommended you use this module with the Playlyfe NodeJS SDK

npm install passport-playlyfe
passport = require('passport');
PlaylyfeOAuth2Strategy = require('passport-playlyfe');
passport.use( new PlaylyfeOAuth2Strategy({
  clientID: 'YOUR_CLIENT_ID',
  clientSecret: 'YOUR_CLIENT_SECRET',
}, function(accessToken, refreshToken, profile, done) {
   // Custom application code
   done(null, profile);

The redirect URI must match exactly with any of the registered redirect endpoints or the oauth flow will fail.

Use passport.authenticate(), specifying the 'playlyfe' strategy, to authenticate requests.

For example in an express application with connect style middleware.

app.get('/auth/playlyfe', passport.authenticate('playlyfe'), function(req, res) {
   //Application code.

For a complete example of a playlyfe application checkout the Playlyfe Express Application

The MIT License

Copyright(c) 2013-2014, Playlyfe Technologies,,