From 794902716e19aa6be25ead52d1664b21d242fdd8 Mon Sep 17 00:00:00 2001 From: Michal Dzik Date: Mon, 2 Aug 2021 21:27:36 +0200 Subject: [PATCH] feat(@nestjs/passport): add promise support in getAuthenticateOptions --- lib/auth.guard.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth.guard.ts b/lib/auth.guard.ts index a7f4ed2b..c5d152f0 100644 --- a/lib/auth.guard.ts +++ b/lib/auth.guard.ts @@ -42,7 +42,7 @@ function createAuthGuard(type?: string | string[]): Type { const options = { ...defaultOptions, ...this.options, - ...this.getAuthenticateOptions(context) + ...await this.getAuthenticateOptions(context) }; const [request, response] = [ this.getRequest(context), @@ -85,7 +85,7 @@ function createAuthGuard(type?: string | string[]): Type { getAuthenticateOptions( context: ExecutionContext - ): IAuthModuleOptions | undefined { + ): Promise | IAuthModuleOptions | undefined { return undefined; } }