bugfix error

This commit is contained in:
AJ ONeal 2017-02-22 17:58:49 -07:00
parent c4b44a249a
commit 431bf019d8
1 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ OAUTH3.authn.resourceOwnerPassword = function (directive, opts) {
var data = req.data;
data.provider_uri = providerUri;
if (data.error) {
return OAUTH3.PromiseA.reject(OAUTH3.error.parse(providerUri, data.error));
return OAUTH3.PromiseA.reject(OAUTH3.error.parse(providerUri, data));
}
return OAUTH3.hooks.session.refresh(
opts.session || { provider_uri: providerUri, client_uri: opts.client_uri || opts.clientUri }
@ -400,7 +400,7 @@ OAUTH3.authz.grants = function (providerUri, opts) {
var grants = grantsResult.originalData || grantsResult.data;
// TODO
if (grants.error) {
return OAUTH3.PromiseA.reject(OAUTH3.error.parse(grants.error));
return OAUTH3.PromiseA.reject(OAUTH3.error.parse(providerUri, grants));
}
console.warn('requests.grants', grants);