You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// list of valid scopesconstVALID_SCOPES=['read','write'];functionvalidateScope(user,client,scope){returnscope.split(' ').filter(s=>VALID_SCOPES.indexOf(s)>=0).join(' ');}
Note that the example above will still reject completely invalid scopes, since validateScope returns an empty string if all scopes are filtered out.
In document https://oauth2-server.readthedocs.io/en/latest/model/spec.html#validatescope-user-client-scope-callback
If you see https://github.com/oauthjs/node-oauth2-server/blob/master/lib/grant-types/password-grant-type.js#L107-L109 the scope passed to
generateAccessToken
andgenerateRefreshToken
is requested scope not scope that partially acceptedThe text was updated successfully, but these errors were encountered: