diff --git a/oauth3.core.js b/oauth3.core.js index dd3fea9..f36482b 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -708,6 +708,7 @@ return OAUTH3.PromiseA.reject(OAUTH3.error.parse(directives.issuer /*providerUri*/, params)); } + OAUTH3.hooks.session._cache = {}; return params; }); } diff --git a/oauth3.issuer.mock.js b/oauth3.issuer.mock.js index 7add79e..d59db8a 100644 --- a/oauth3.issuer.mock.js +++ b/oauth3.issuer.mock.js @@ -177,12 +177,12 @@ }; OAUTH3.authz.scopes = function () { - return { + return OAUTH3.PromiseA.resolve({ pending: ['oauth3_authn'] // not yet accepted , granted: [] // all granted, ever , requested: ['oauth3_authn'] // all requested, now , accepted: [] // granted (ever) and requested (now) - }; + }); }; OAUTH3.authz.grants = function (providerUri, opts) { if ('POST' === opts.method) {