Closed dhensby closed 10 months ago
Specify your setup
Describe the bug
Typings for validateScope don't correctly reflect that scope arg can be undefined
validateScope
scope
To Reproduce
Steps to reproduce the behavior:
model.validateScope()
Expected behavior
The typings correctly reflect that the scope argument is optional.
Screenshots
n/a
Additional context
The scope util that is responsible for parsing the scopes from a request (https://github.com/node-oauth/node-oauth2-server/blob/v5.0.0/lib/utils/scope-util.js#L10-L12) returns undefined when no scope parameter is present and this return value is then passed to the validateScope() method.
undefined
validateScope()
Specify your setup
Describe the bug
Typings for
validateScope
don't correctly reflect thatscope
arg can be undefinedTo Reproduce
Steps to reproduce the behavior:
scope
parameter tomodel.validateScope()
method is `undefinedExpected behavior
The typings correctly reflect that the
scope
argument is optional.Screenshots
n/a
Additional context
The scope util that is responsible for parsing the scopes from a request (https://github.com/node-oauth/node-oauth2-server/blob/v5.0.0/lib/utils/scope-util.js#L10-L12) returns
undefined
when no scope parameter is present and this return value is then passed to thevalidateScope()
method.