From efd813a107cf30d418c550bb48a50e28edf70214 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 7 Feb 2017 19:37:32 -0700 Subject: [PATCH] bugfix discover --- oauth3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth3.js b/oauth3.js index a2b7bf2..c7cc5e3 100644 --- a/oauth3.js +++ b/oauth3.js @@ -483,9 +483,9 @@ oauth3._discoverHelperNew = function (providerUri, opts) { opts = opts || {}; var state = oauth3.createState(); - var url = oauth3.core.discover(providerUri, { state: state, appUrl: (opts.appUrl || getDefaultAppUrl()) }); + var discObj = oauth3.core.discover(providerUri, { state: state, appUrl: (opts.appUrl || getDefaultAppUrl()) }); - return oauth3.insertIframe(url, state, opts).then(function (directives) { + return oauth3.insertIframe(discObj.url, state, opts).then(function (directives) { return directives; }, function (err) { return oauth3.PromiseA.reject(err);