Skip to content

Commit

Permalink
Merge pull request #647 from Dzixxx/promise-handling-in-get-auth-options
Browse files Browse the repository at this point in the history
feat(@nestjs/passport): add promise support in getAuthenticateOptions
  • Loading branch information
kamilmysliwiec committed Aug 3, 2021
2 parents 42686a3 + 7949027 commit 45f9f3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function createAuthGuard(type?: string | string[]): Type<CanActivate> {
const options = {
...defaultOptions,
...this.options,
...this.getAuthenticateOptions(context)
...await this.getAuthenticateOptions(context)
};
const [request, response] = [
this.getRequest(context),
Expand Down Expand Up @@ -85,7 +85,7 @@ function createAuthGuard(type?: string | string[]): Type<CanActivate> {

getAuthenticateOptions(
context: ExecutionContext
): IAuthModuleOptions | undefined {
): Promise<IAuthModuleOptions> | IAuthModuleOptions | undefined {
return undefined;
}
}
Expand Down

0 comments on commit 45f9f3a

Please sign in to comment.