Comparing version 1.3.5 to 1.3.6
@@ -110,2 +110,17 @@ var fs = require('fs'); | ||
} | ||
}, | ||
maxcdn: { | ||
purgeCache: { | ||
options: { | ||
companyAlias: process.env.MAXCDN_COMPANY_ALIAS, | ||
consumerKey: process.env.MAXCDN_CONSUMER_KEY, | ||
consumerSecret: process.env.MAXCDN_CONSUMER_SECRET, | ||
zone_id: process.env.MAXCDN_ZONE_ID, | ||
method: 'delete' | ||
}, | ||
files: [ | ||
{ dest: 'w2/auth0-' + pkg.version + '.min.js' }, | ||
{ dest: 'w2/auth0-' + pkg.version + '.js' }, | ||
], | ||
}, | ||
} | ||
@@ -125,3 +140,3 @@ }); | ||
grunt.registerTask("integration", ["exec:test-desktop", "exec:test-mobile"]); | ||
grunt.registerTask("cdn", ["s3"]); | ||
grunt.registerTask("cdn", ["s3","maxcdn:purgeCache"]); | ||
}; |
@@ -32,6 +32,11 @@ var assert_required = require('./assert_required'); | ||
Auth0.prototype._renderAndSubmitWSFedForm = function (formHtml) { | ||
Auth0.prototype._renderAndSubmitWSFedForm = function (options, formHtml) { | ||
var div = document.createElement('div'); | ||
div.innerHTML = formHtml; | ||
var form = document.body.appendChild(div).children[0]; | ||
if (options.popup && !this._callbackOnLocationHash) { | ||
form.target = 'auth0_signup_popup'; | ||
} | ||
form.submit(); | ||
@@ -169,3 +174,3 @@ }; | ||
return this.loginWithPopup(options, callback); | ||
}; | ||
} | ||
@@ -192,3 +197,3 @@ var query = xtend( | ||
var popup = window.open(popupUrl, null, popupSettings(popupOptions)); | ||
var popup = window.open(popupUrl, null, stringifyPopupSettings(popupOptions)); | ||
if (!popup) { return callback(new Error('Unable to open popup')); } | ||
@@ -244,13 +249,14 @@ | ||
function popupSettings(options) { | ||
// Stringify popup options object into | ||
// `window.open` string options format | ||
var settings = ''; | ||
}; | ||
for (var key in popupOptions) { | ||
settings += key + '=' + popupOptions[key] + ','; | ||
} | ||
function stringifyPopupSettings(popupOptions) { | ||
// Stringify popup options object into | ||
// `window.open` string options format | ||
var settings = ''; | ||
return settings.slice(0, -1); | ||
for (var key in popupOptions) { | ||
settings += key + '=' + popupOptions[key] + ','; | ||
} | ||
return settings.slice(0, -1); | ||
} | ||
@@ -262,2 +268,9 @@ | ||
if (options.popup && !this._callbackOnLocationHash) { | ||
var popupOptions = stringifyPopupSettings(xtend( | ||
{ width: 500, height: 600 }, | ||
(options.popupOptions || {}))); | ||
window.open('about:blank', 'auth0_signup_popup',popupOptions); | ||
} | ||
var query = xtend( | ||
@@ -287,3 +300,3 @@ this._getMode(), | ||
} | ||
self._renderAndSubmitWSFedForm(resp.form); | ||
self._renderAndSubmitWSFedForm(options, resp.form); | ||
}); | ||
@@ -304,3 +317,3 @@ } | ||
success: function (resp) { | ||
self._renderAndSubmitWSFedForm(resp); | ||
self._renderAndSubmitWSFedForm(options, resp); | ||
} | ||
@@ -326,3 +339,3 @@ }).fail(function (err) { | ||
} | ||
options.id_token = id_token; | ||
@@ -329,0 +342,0 @@ |
{ | ||
"name": "auth0-js", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "Auth0 headless browser sdk", | ||
@@ -47,4 +47,5 @@ "main": "lib/index.js", | ||
"grunt-s3": "~0.2.0-alpha.3", | ||
"testem": "~0.5.8" | ||
"testem": "~0.5.8", | ||
"grunt-maxcdn": "https://github.com/siacomuzzi/grunt-maxcdn/tarball/0.0.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
296611
6171
17
16