manjeshpv / node-oauth2-server-implementation

Using oauth2-server: 3.0.0-b2 & Supports MongoDB, MySQL, PostgreSQL, MSSQL & SQLite
216 stars 103 forks source link

Change to module exports so that authentication handler can deal with… #7

Closed netbofia closed 7 years ago

netbofia commented 7 years ago

… scopes.

The authenticate handler expects a function verifyScope() Which on is wrong? the model exports or is the authenticate handler wrong?

oauth2-server module, file /lib/handlers/authenticate-handler.js

if (options.scope && !options.model.verifyScope) { throw new InvalidArgumentError('Invalid argument: model does not implement verifyScope()'); }