mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
fixed twitter tests, added _raw and _json properties
This commit is contained in:
3
passport-facebook/passport-facebook.d.ts
vendored
3
passport-facebook/passport-facebook.d.ts
vendored
@@ -14,6 +14,9 @@ declare module 'passport-facebook' {
|
||||
gender: string;
|
||||
profileUrl: string;
|
||||
username: string;
|
||||
|
||||
_raw: string;
|
||||
_json: any;
|
||||
}
|
||||
|
||||
interface IStrategyOption {
|
||||
|
||||
@@ -12,6 +12,9 @@ declare module 'passport-google-oauth' {
|
||||
|
||||
interface Profile extends passport.Profile {
|
||||
gender: string;
|
||||
|
||||
_raw: string;
|
||||
_json: any;
|
||||
}
|
||||
|
||||
interface IOAuthStrategyOption {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
5
passport-twitter/passport-twitter.d.ts
vendored
5
passport-twitter/passport-twitter.d.ts
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user