From e2bdfb79e6e2c51958602bdf355fac1804e1c084 Mon Sep 17 00:00:00 2001 From: Joshua Kifer Date: Tue, 13 Dec 2016 12:33:08 -0800 Subject: [PATCH 1/2] Utilize scope option --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fec42a37..7ccce6f4 100644 --- a/index.js +++ b/index.js @@ -266,7 +266,7 @@ Auth0.prototype._renderAndSubmitWSFedForm = function (options, formHtml) { Auth0.prototype._getMode = function (options) { var result = { - scope: 'openid', + scope: this._scope, response_type: this._getResponseType(options) }; @@ -1331,7 +1331,7 @@ Auth0.prototype.loginWithResourceOwner = function (options, callback) { Auth0.prototype.loginWithSocialAccessToken = function (options, callback) { var _this = this; var query = this._buildAuthorizationParameters([ - { scope: 'openid' }, + { scope: this._scope }, options, { client_id: this._clientID } ]); From 7f3f657cca8013e6c48a9e9f14254441904ac150 Mon Sep 17 00:00:00 2001 From: Joshua Kifer Date: Tue, 13 Dec 2016 12:34:47 -0800 Subject: [PATCH 2/2] Default scope to 'openid' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7ccce6f4..973e51af 100644 --- a/index.js +++ b/index.js @@ -161,7 +161,7 @@ function Auth0 (options) { this._useCordovaSocialPlugins = false || options.useCordovaSocialPlugins; this._sendClientInfo = null != options.sendSDKClientInfo ? options.sendSDKClientInfo : true; - this._scope = options.scope || null; + this._scope = options.scope || 'openid'; this._audience = options.audience || null; }