Merge pull request #13201 from delaneyj/types-2.0

passport-twitter 1.0.4
This commit is contained in:
Ron Buckton
2016-12-08 12:11:10 -08:00
committed by GitHub
2 changed files with 8 additions and 3 deletions
+5 -2
View File
@@ -1,5 +1,5 @@
// Type definitions for passport-facebook 1.0.3
// Project: https://github.com/jaredhanson/passport-facebook
// Type definitions for passport-twitter 1.0.4
// Project: https://github.com/jaredhanson/passport-twitter
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -24,6 +24,9 @@ interface IStrategyOption {
consumerSecret: string;
callbackURL: string;
passReqToCallback?: true;
includeEmail?: true;
reguestTokenURL?: string;
accessTokenURL?: string;
userAuthorizationURL?: string;
+3 -1
View File
@@ -15,7 +15,9 @@ var User = {
passport.use(new twitter.Strategy({
consumerKey: process.env.PASSPORT_TWITTER_CONSUMER_KEY,
consumerSecret: process.env.PASSPORT_TWITTER_CONSUMER_SECRET,
callbackURL: process.env.PASSPORT_TWITTER_CALLBACK_URL
callbackURL: process.env.PASSPORT_TWITTER_CALLBACK_URL,
passReqToCallback : true,
includeEmail: true
},
function(accessToken:string, refreshToken:string, profile:twitter.Profile, done:(error:any, user?:any) => void) {
User.findOrCreate(profile.id, profile.provider, function(err, user) {