Skip to content

Commit a8375bc

Browse files
committed
fix: callback support on implicit grant type's saveToken model function
1 parent f60b519 commit a8375bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/grant-types/implicit-grant-type.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
var AbstractGrantType = require('./abstract-grant-type');
88
var InvalidArgumentError = require('../errors/invalid-argument-error');
99
var Promise = require('bluebird');
10+
var promisify = require('promisify-any').use(Promise);
1011
var util = require('util');
1112

1213
/**
@@ -76,7 +77,7 @@ ImplicitGrantType.prototype.saveToken = function(user, client, scope) {
7677
scope: scope
7778
};
7879

79-
return this.model.saveToken(token, client, user);
80+
return promisify(this.model.saveToken, 3).call(this.model, token, client, user);
8081
});
8182
};
8283

0 commit comments

Comments
 (0)