Skip to content

Commit

Permalink
fix(oauth2 scheme): make options extendable (#774)
Browse files Browse the repository at this point in the history
As designed, we cannot add additional options when extending the
Oauth2Scheme. To make options extensible I borrowed code from the
LocalScheme implementation which lets us pass the child's default
options up to its parent.

Co-authored-by: Tim Chavez <tim@riv.al>
  • Loading branch information
timrchavez and tim-rival committed Jul 25, 2020
1 parent bfcf6e2 commit db756d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schemes/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export default class Oauth2Scheme extends BaseScheme<typeof DEFAULTS> {
public refreshController: RefreshController
public requestHandler: RequestHandler

constructor ($auth, options) {
super($auth, options, DEFAULTS)
constructor ($auth, options, ...defaults) {
super($auth, options, ...defaults, DEFAULTS)

this.req = $auth.ctx.req

Expand Down

0 comments on commit db756d2

Please sign in to comment.