Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #4 - sql fix #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

issue #4 - sql fix #20

wants to merge 1 commit into from

Conversation

ulpsilva
Copy link

@ulpsilva ulpsilva commented Aug 8, 2017

I fix the SQL side in the issue

return (user.scope === scope && client.scope === scope && scope !== null) ? scope : false
function validateScope(token, client, scope) {
console.log("validateScope", token, client, scope);
return (user.scope === client.scope) ? scope : false
Copy link

@jankal jankal Jan 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user is not defined! How should this ever work?

The method signature is as follows:

AbstractGrantType.prototype.validateScope = function(user, client, scope) {}

See oauthjs/node-oauth2-server

@@ -260,7 +262,7 @@ module.exports = {
revokeToken: revokeToken,
saveToken: saveToken,//saveOAuthAccessToken, renamed to
saveAuthorizationCode: saveAuthorizationCode, //renamed saveOAuthAuthorizationCode,
validateScope: validateScope,
// validateScope: validateScope,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateScope is a key part of this oauth procedure. Why do you remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants