From 58e136504dbf04dfb77717f9ef305c4955e98feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Pablo=20Fern=C3=A1ndez?= <8425+pupeno@users.noreply.github.com> Date: Mon, 6 Jul 2020 22:11:33 +0100 Subject: [PATCH] Passport's authorize function accepts Strategy (#45817) Some references: https://medium.com/passportjs/authenticate-using-strategy-instances-49e58d96ec8c https://stackoverflow.com/a/62644453/6068 --- types/passport/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/passport/index.d.ts b/types/passport/index.d.ts index 815ee68b65..ddda8bfcb6 100644 --- a/types/passport/index.d.ts +++ b/types/passport/index.d.ts @@ -69,8 +69,8 @@ declare namespace passport { initialize(options?: { userProperty: string; }): InitializeRet; session(options?: { pauseStream: boolean; }): AuthenticateRet; - authenticate(strategy: string | string[], callback?: (...args: any[]) => any): AuthenticateRet; - authenticate(strategy: string | string[], options: AuthenticateOptions, callback?: (...args: any[]) => any): AuthenticateRet; + authenticate(strategy: string | string[] | Strategy, callback?: (...args: any[]) => any): AuthenticateRet; + authenticate(strategy: string | string[] | Strategy, options: AuthenticateOptions, callback?: (...args: any[]) => any): AuthenticateRet; authorize(strategy: string | string[], callback?: (...args: any[]) => any): AuthorizeRet; authorize(strategy: string | string[], options: AuthorizeOptions, callback?: (...args: any[]) => any): AuthorizeRet; serializeUser(fn: (user: TUser, done: (err: any, id?: TID) => void) => void): void;