mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
18 lines
712 B
JavaScript
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; |