diff --git a/bower.json b/bower.json index 788e053..59aba45 100644 --- a/bower.json +++ b/bower.json @@ -39,5 +39,5 @@ "test", "tests" ], - "version": "1.0.6" + "version": "1.0.8" } diff --git a/oauth3.core.js b/oauth3.core.js index 3b31951..43acd4a 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -628,7 +628,7 @@ function fetch() { if (preq.session) { // TODO check session.token.aud against preq.url to make sure they match - console.warn("[security] session audience checking has not been implemented yet (it's up to you to check)"); + //console.warn("[security] session audience checking has not been implemented yet (it's up to you to check)"); preq.headers = preq.headers || {}; preq.headers.Authorization = 'Bearer ' + (preq.session.access_token || preq.session.accessToken); } @@ -1037,7 +1037,7 @@ } , api: function (providerUri, opts) { if (!OAUTH3.api[opts.api]) { - return OAUTH3.PromiseA.reject(new Error("No API for '" + providerUri + "'")); + return OAUTH3.PromiseA.reject(new Error("No API for '" + opts.api + "'")); } return OAUTH3.api[opts.api](providerUri, opts); @@ -1086,6 +1086,8 @@ if (!me._providerUri) { throw new Error("'providerUri' was not supplied"); } + opts.session.provider_uri = me._providerUri + opts.session.client_uri = me._clientUri me.session(opts.session, opts.sessionId); } } diff --git a/package.json b/package.json index f140b3a..6d1b4ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oauth3.js", - "version": "1.0.6", + "version": "1.0.8", "description": "The world's smallest, fastest, and most secure OAuth3 (and OAuth2) JavaScript implementation.", "main": "oauth3.node.js", "scripts": {