From 8e701011b8b38e76a97d2908869ba34e332180ab Mon Sep 17 00:00:00 2001 From: AndreasGassmann Date: Tue, 7 Apr 2015 08:10:50 +0200 Subject: [PATCH] Add support for 'passReqToCallback' to passport-local When 'passReqToCallback' is true, 'req' will be passed as the first argument to the verify callback. --- passport-local/passport-local.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passport-local/passport-local.d.ts b/passport-local/passport-local.d.ts index 6b3cbef38..d61e51b15 100644 --- a/passport-local/passport-local.d.ts +++ b/passport-local/passport-local.d.ts @@ -13,6 +13,7 @@ declare module 'passport-local' { interface IStrategyOptions { usernameField?: string; passwordField?: string; + passReqToCallback?: boolean; } interface IVerifyOptions { @@ -20,6 +21,7 @@ declare module 'passport-local' { } interface VerifyFunction { + (req: express.Request, username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void; (username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void; }