JSPM

passport-learningstudio

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q33568F

A Passport Strategy for Pearson's Learning Studio.

Package Exports

  • passport-learningstudio

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (passport-learningstudio) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

passport-learningstudio

Install

$ npm install passport-learningstudio

Usage

var passport = require('passport')
  , LearningStudioStrategy = require('passport-learningstudio').LearningStudioStrategy;

passport.use(new LearningStudioStrategy({
    clientID: application_id,
    clientSecret: shared_secret,
    callbackURL: "http://127.0.0.1:3000/auth/learningstudio/callback"
  },
  function(accessToken, refreshToken, profile, done) {
    User.findOrCreate("...", function(err, user) {
      if (err) { return done(err); }
      done(null, user);
    });
  }
));

Tests

$ npm install
$ npm test

Credits

License

The MIT License

Derived from the work of Jared Hanson.