Merge branch 'v1' of git.daplie.com:Daplie/oauth3.js into v1

This commit is contained in:
drewwarren 2017-02-24 14:18:50 -05:00
commit 05500a8243
1 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,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(
@ -386,7 +386,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));
}
OAUTH3.hooks.grants.set(opts.client_id + '-client', grants.client);