Closed
Description
Specify your setup
- Operating System: MacOS
- Node version: 18
- npm version: 8
- version of @node-oauth/oauth2-server: 5.0.0
- which OAuth2 workflow: client_credentials
- at which workflow step does the error occur: all
Describe the bug
Typings for validateScope
don't correctly reflect that scope
arg can be undefined
To Reproduce
Steps to reproduce the behavior:
- Receive an HTTP request with no scope parameter
- Note that
scope
parameter tomodel.validateScope()
method is `undefined
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.
Metadata
Metadata
Assignees
Labels
No labels