mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[passport-facebook] Add missing optional param in verify callback (#13944)
This commit is contained in:
committed by
Sheetal Nandi
parent
3a6791b20e
commit
99ddd7b2e6
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for passport-facebook 1.0.3
|
||||
// Type definitions for passport-facebook 2.1.1
|
||||
// Project: https://github.com/jaredhanson/passport-facebook
|
||||
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
|
||||
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>, Lucas Acosta <https://github.com/lucasmacosta>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="passport"/>
|
||||
@@ -31,7 +31,7 @@ interface IStrategyOption {
|
||||
|
||||
declare class Strategy implements passport.Strategy {
|
||||
constructor(options: IStrategyOption,
|
||||
verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
|
||||
verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void);
|
||||
name: string;
|
||||
authenticate: (req: express.Request, options?: Object) => void;
|
||||
}
|
||||
|
||||
@@ -24,3 +24,13 @@ passport.use(new facebook.Strategy({
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
passport.use(new facebook.Strategy({
|
||||
clientID: process.env.PASSPORT_FACEBOOK_CLIENT_ID,
|
||||
clientSecret: process.env.PASSPORT_FACEBOOK_CLIENT_SECRET,
|
||||
callbackURL: process.env.PASSPORT_FACEBOOK_CALLBACK_URL
|
||||
},
|
||||
function(accessToken:string, refreshToken:string, profile:facebook.Profile, done:(error:any, user?:any, info?:any) => void) {
|
||||
done(null, false, { message: 'Some error.' });
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user