0.0.2 • Published 7 years ago

tayr-passport v0.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

it uses md5

Usage

var tayrPassport = require('./tayr-passport');

var passport = tayrPassport.use({
    app: app, // Required
    T: T, // Required
    secret: 'secret',
    usernameField: 'email',
    loginSrategyName: 'login',
    usersTable: 'user',
    socials: {
        facebook: {
            clientID: "CLIENTID",
            clientSecret: "CLIENTSECRET",
            callbackURL: "http://www.example.com/callback",
        },
        google: {
            clientID: "CLIENTID",
            clientSecret: "CLIENTSECRET",
            callbackURL: "http://www.example.com/callback",
        },
        twitter: {
            consumerKey: "CONSUMERKEY",
            consumerSecret: "CONSUMERSECRET",
            callbackURL: "http://www.example.com/callback",
        }
    },
    onCreateSocials: function (profile) {
        return {
            username: profile.displayName,
            register_date: new Date(),
            role: 'normal'
        }
    }
});