diff --git a/passport-twitter/index.d.ts b/passport-twitter/index.d.ts index ee0ad9ea4b..387fa7ab44 100644 --- a/passport-twitter/index.d.ts +++ b/passport-twitter/index.d.ts @@ -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 // 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; diff --git a/passport-twitter/passport-twitter-tests.ts b/passport-twitter/passport-twitter-tests.ts index 815d490610..66355a2f31 100644 --- a/passport-twitter/passport-twitter-tests.ts +++ b/passport-twitter/passport-twitter-tests.ts @@ -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) {