fixed twitter tests, added _raw and _json properties

This commit is contained in:
Josh Heyse
2015-06-03 12:35:10 -05:00
parent ca327372d6
commit a1915bad2e
4 changed files with 14 additions and 3 deletions

View File

@@ -14,6 +14,9 @@ declare module 'passport-facebook' {
gender: string;
profileUrl: string;
username: string;
_raw: string;
_json: any;
}
interface IStrategyOption {

View File

@@ -12,6 +12,9 @@ declare module 'passport-google-oauth' {
interface Profile extends passport.Profile {
gender: string;
_raw: string;
_json: any;
}
interface IOAuthStrategyOption {

View File

@@ -12,9 +12,9 @@ var User = {
}
passport.use(new twitter.Strategy({
clientID: process.env.PASSPORT_FACEBOOK_CLIENT_ID,
clientSecret: process.env.PASSPORT_FACEBOOK_CLIENT_SECRET,
callbackURL: process.env.PASSPORT_FACEBOOK_CALLBACK_URL
consumerKey: process.env.PASSPORT_TWITTER_CONSUMER_KEY,
consumerSecret: process.env.PASSPORT_TWITTER_CONSUMER_SECRET,
callbackURL: process.env.PASSPORT_TWITTER_CALLBACK_URL
},
function(accessToken:string, refreshToken:string, profile:twitter.Profile, done:(error:any, user?:any) => void) {
User.findOrCreate(profile.id, profile.provider, function(err, user) {

View File

@@ -12,6 +12,11 @@ declare module 'passport-twitter' {
interface Profile extends passport.Profile {
gender: string;
username: string;
_raw: string;
_json: any;
_accessLevel: string;
}
interface IStrategyOption {