Skip to content

Commit

Permalink
Allow chaining with Authenticator#use (#258)
Browse files Browse the repository at this point in the history
Update authenticator.ts
  • Loading branch information
lifeiscontent committed Nov 15, 2023
1 parent 93875c1 commit 7f0f4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Authenticator<User = unknown> {
* .use(new SomeStrategy({}, (user) => Promise.resolve(user)))
* .use(new SomeStrategy({}, (user) => Promise.resolve(user)), "another");
*/
use(strategy: Strategy<User, never>, name?: string): Authenticator {
use(strategy: Strategy<User, never>, name?: string): Authenticator<User> {
this.strategies.set(name ?? strategy.name, strategy);
return this;
}
Expand Down

0 comments on commit 7f0f4bc

Please sign in to comment.