strongloop / loopback-component-oauth2

oAuth 2.0 server for LoopBack
http://www.strongloop.com
Other
62 stars 63 forks source link

Scope checker returns false when a correct scope has been requested. #23

Closed royklopper closed 9 years ago

royklopper commented 9 years ago

When authorizing a user and requesting access to multiple scopes, the authorization to the resource server rejects access to the resource telling me the following:

{"error":"insufficient_scope","error_description":"Insufficient scope"}

Inspecting the data in the datasource tells me I do have access to the specified scope. After inspecting I traced it back to the oauth2-helper file, specifically the isScopeAllowed function. Seems it has a small bug there using the right scope array to check with.