Files
trunk-server/account/server/config/passport-strategies/twitter.js
Luke Berndt 943c5a63ad clean up
2021-03-04 10:59:34 -05:00

18 lines
712 B
JavaScript

var Strategy = require('passport-twitter').Strategy;
const User = require("../../models/user");
const twitter = new Strategy({
consumerKey: process.env['TWITTER_CONSUMER_KEY'],
consumerSecret: process.env['TWITTER_CONSUMER_SECRET'],
callbackURL: '/oauth/callback'
},
function(token, tokenSecret, profile, cb) {
// In this example, the user's Twitter profile is supplied as the user
// record. In a production-quality application, the Twitter profile should
// be associated with a user record in the application's database, which
// allows for account linking and authentication with other identity
// providers.
return cb(null, profile);
})
module.exports = local;