passport-andyet

0.0.1 • Public • Published

passport-andyet

This is a passport strategy for andyet's auth

Install

npm install passport-andyet

Usage

var AndyetStrategy = require('passport-andyet').Strategy;
 
Passport.use(new AndyetStrategy({
    clientId: YOUR_CLIENT_ID,
    clientSecret: YOUR_CLIENT_SECRET,
    apps: 'https://apps.andyet.com', // this is the default, but can be overridden
    api: 'https://api.andbang.com' // again, this is the default
}, function (accessToken, refreshToken, profile, done) {
    // profile is the json object representing the user as fetched from the /me route of the api
    // you can use that data to look up a local user, or whatever else you need to do here
    // when you're finished call done with an error parameter first (if there was an error) and
    // the user object second
    done(null, profile);
});

Readme

Keywords

Package Sidebar

Install

npm i passport-andyet

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • nlf