mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
fix: fixed error with method bindings on strategies (#2971)
- moved request bindings to after the cache handler Co-authored-by: Kim Gardner <kgardnr@gmail.com>
This commit is contained in:
co-authored by
Kim Gardner
parent
3e0241b523
commit
08a9788bcc
@@ -126,16 +126,16 @@ export default abstract class OAuth2Strategy<
|
||||
integration as Required<T>
|
||||
) as StrategyCreated<U>;
|
||||
|
||||
// Augment the strategy with the request method bindings.
|
||||
strategy.error = this.error.bind(this);
|
||||
strategy.fail = this.fail.bind(this);
|
||||
strategy.pass = this.pass.bind(this);
|
||||
strategy.redirect = this.redirect.bind(this);
|
||||
strategy.success = this.success.bind(this);
|
||||
|
||||
this.cache.set(tenant.id, strategy);
|
||||
}
|
||||
|
||||
// Augment the strategy with the request method bindings.
|
||||
strategy.error = this.error.bind(this);
|
||||
strategy.fail = this.fail.bind(this);
|
||||
strategy.pass = this.pass.bind(this);
|
||||
strategy.redirect = this.redirect.bind(this);
|
||||
strategy.success = this.success.bind(this);
|
||||
|
||||
strategy.authenticate(req, {
|
||||
session: false,
|
||||
...this.authenticateOptions,
|
||||
|
||||
Reference in New Issue
Block a user