Skip to content

Commit

Permalink
Add more overloads to authenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Feb 23, 2023
1 parent fe2917f commit 05f710e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,24 @@ export class Authenticator<User = unknown> {
successRedirect: AuthenticateOptions["successRedirect"];
}
): never;
authenticate(
strategy: string,
request: Request,
options: Pick<
AuthenticateOptions,
"successRedirect" | "throwOnError" | "context"
> & {
failureRedirect: AuthenticateOptions["failureRedirect"];
}
): Promise<User>;
authenticate(
strategy: string,
request: Request,
options?: Pick<
AuthenticateOptions,
"successRedirect" | "failureRedirect" | "throwOnError" | "context"
>
): Promise<User>;
authenticate(
strategy: string,
request: Request,
Expand Down

0 comments on commit 05f710e

Please sign in to comment.