Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth0-js

Package Overview
Dependencies
Maintainers
8
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-js - npm Package Compare versions

Comparing version 9.6.0 to 9.6.1

SECURITY-NOTICE.md

17

build/cordova-auth0-plugin.js

@@ -230,22 +230,24 @@ (function webpackUniversalModuleDefinition(root, factory) {

/* WEBPACK VAR INJECTION */(function(global) {var objectHelper = __webpack_require__(1);
var objectHelper = __webpack_require__(1);
function redirect(url) {
global.window.location = url;
getWindow().location = url;
}
function getDocument() {
return global.window.document;
return getWindow().document;
}
function getWindow() {
return global.window;
return window;
}
function getOrigin() {
var location = global.window.location;
var location = getWindow().location;
var origin = location.origin;
if (!origin) {
origin = objectHelper.getOriginFromUrl(location.href);
}
return origin;

@@ -260,5 +262,4 @@ }

};
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },

@@ -619,3 +620,3 @@ /* 3 */

module.exports = { raw: '9.6.0' };
module.exports = { raw: '9.6.1' };

@@ -622,0 +623,0 @@

/*!
* cordova-auth0-plugin.min.js v9.6.0
* cordova-auth0-plugin.min.js v9.6.1
*
* Author: Auth0
* Date: 5/28/2018, 8:03:12 PM
* Date: 6/7/2018, 8:25:40 PM
* License: MIT
*
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cordova-auth0-plugin",[],e):"object"==typeof exports?exports["cordova-auth0-plugin"]=e():t.CordovaAuth0Plugin=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(46)},function(t,e,r){function n(t,e){return e.reduce(function(e,r){return t[r]&&(e[r]=t[r]),e},{})}function o(t,e){var r=[];for(var n in t)e.indexOf(n)===-1&&r.push(n);return r}function i(t){var e=[];for(var r in t)e.push(t[r]);return e}function a(){var t=i(arguments);return t.unshift({}),v.get().apply(void 0,t)}function c(t,e){return{base:e?n(t,e):t,with:function(t,e){return t=e?n(t,e):t,a(this.base,t)}}}function u(t,e){return Object.keys(t).reduce(function(r,n){return e.indexOf(n)===-1&&(r[n]=t[n]),r},{})}function s(t){for(var e,r="",n=0,o=!0,i=!0;n<t.length;)e=t.charCodeAt(n),!i&&e>=65&&e<=90||!o&&e>=48&&e<=57?(r+="_",r+=t[n].toLowerCase()):r+=t[n].toLowerCase(),o=e>=48&&e<=57,i=e>=65&&e<=90,n++;return r}function p(t){var e=t.split("_");return e.reduce(function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},e.shift())}function l(t,e){return"object"!=typeof t||h.isArray(t)||null===t?t:(e=e||[],Object.keys(t).reduce(function(r,n){var o=e.indexOf(n)===-1?s(n):n;return r[o]=l(t[n]),r},{}))}function f(t,e){return"object"!=typeof t||h.isArray(t)||null===t?t:(e=e||[],Object.keys(t).reduce(function(r,n){var o=e.indexOf(n)===-1?p(n):n;return r[o]=f(t[n]),r},{}))}function d(t){var e=t.match(/^(https?:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return e&&{href:t,protocol:e[1],host:e[2],hostname:e[3],port:e[4],pathname:e[5],search:e[6],hash:e[7]}}function y(t){if(t){var e=d(t),r=e.protocol+"//"+e.hostname;return e.port&&(r+=":"+e.port),r}}var h=r(4),v=r(15);t.exports={toSnakeCase:l,toCamelCase:f,blacklist:u,merge:c,pick:n,getKeysNotIn:o,extend:a,getOriginFromUrl:y,getLocationFromUrl:d}},function(t,e,r){(function(e){function n(t){e.window.location=t}function o(){return e.window.document}function i(){return e.window}function a(){var t=e.window.location,r=t.origin;return r||(r=c.getOriginFromUrl(t.href)),r}var c=r(1);t.exports={redirect:n,getDocument:o,getWindow:i,getOrigin:a}}).call(e,function(){return this}())},function(t,e,r){var n,o;!function(i,a,c){"undefined"!=typeof t&&t.exports?t.exports=c():(n=c,o="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==o&&(t.exports=o)))}("urljoin",this,function(){function t(t,e){return t=t.replace(/:\//g,"://"),t=t.replace(/([^:\s])\/+/g,"$1/"),t=t.replace(/\/(\?|&|#[^!])/g,"$1"),t=t.replace(/(\?.+)\?/g,"$1&")}return function(){var e=arguments,r={};"object"==typeof arguments[0]&&(e=arguments[0],r=arguments[1]||{});var n=[].slice.call(e,0).join("/");return t(n,r)}})},function(t,e){function r(t,e,r,n){if(r="array"===r?"object":r,t&&typeof t[e]!==r)throw new Error(n)}function n(t,e,r){if(typeof t!==e)throw new Error(r)}function o(t,e,r){if(e.indexOf(t)===-1)throw new Error(r)}function i(t,e,i){if(e.optional&&!t||n(t,e.type,e.message),"object"===e.type&&i)for(var a=Object.keys(i),c=0;c<a.length;c++){var u=a[c];i[u].optional&&!t[u]||i[u].condition&&!i[u].condition(t)||(r(t,u,i[u].type,i[u].message),i[u].values&&o(t[u],i[u].values,i[u].value_message))}}function a(t){return this.supportsIsArray()?Array.isArray(t):"[object Array]"===u.call(t)}function c(){return null!=Array.isArray}var u=Object.prototype.toString;t.exports={check:i,attribute:r,variable:n,value:o,isArray:a,supportsIsArray:c}},,function(t,e,r){"use strict";var n=r(14),o=r(13),i=r(8);t.exports={formats:i,parse:o,stringify:n}},,function(t,e){"use strict";var r=String.prototype.replace,n=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,n,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e){"use strict";var r=Object.prototype.hasOwnProperty,n=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}();e.arrayToObject=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)"undefined"!=typeof t[n]&&(r[n]=t[n]);return r},e.merge=function(t,n,o){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var i=t;return Array.isArray(t)&&!Array.isArray(n)&&(i=e.arrayToObject(t,o)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(t,i)?t[i]&&"object"==typeof t[i]?t[i]=e.merge(t[i],n,o):t.push(n):t[i]=n}),t):Object.keys(n).reduce(function(t,r){var i=n[r];return Object.prototype.hasOwnProperty.call(t,r)?t[r]=e.merge(t[r],i,o):t[r]=i,t},i)},e.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},e.encode=function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),r="",o=0;o<e.length;++o){var i=e.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=e.charAt(o):i<128?r+=n[i]:i<2048?r+=n[192|i>>6]+n[128|63&i]:i<55296||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&e.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},e.compact=function(t,r){if("object"!=typeof t||null===t)return t;var n=r||[],o=n.indexOf(t);if(o!==-1)return n[o];if(n.push(t),Array.isArray(t)){for(var i=[],a=0;a<t.length;++a)t[a]&&"object"==typeof t[a]?i.push(e.compact(t[a],n)):"undefined"!=typeof t[a]&&i.push(t[a]);return i}var c=Object.keys(t);return c.forEach(function(r){t[r]=e.compact(t[r],n)}),t},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.isBuffer=function(t){return null!==t&&"undefined"!=typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},,function(t,e){t.exports={raw:"9.6.0"}},,function(t,e,r){"use strict";var n=r(9),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(t,e){for(var r={},n=t.split(e.delimiter,e.parameterLimit===1/0?void 0:e.parameterLimit),i=0;i<n.length;++i){var a,c,u=n[i],s=u.indexOf("]=")===-1?u.indexOf("="):u.indexOf("]=")+1;s===-1?(a=e.decoder(u),c=e.strictNullHandling?null:""):(a=e.decoder(u.slice(0,s)),c=e.decoder(u.slice(s+1))),o.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function(t,e,r){if(!t.length)return e;var n,o=t.shift();if("[]"===o)n=[],n=n.concat(c(t,e,r));else{n=r.plainObjects?Object.create(null):{};var i="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,a=parseInt(i,10);!isNaN(a)&&o!==i&&String(a)===i&&a>=0&&r.parseArrays&&a<=r.arrayLimit?(n=[],n[a]=c(t,e,r)):n[i]=c(t,e,r)}return n},u=function(t,e,r){if(t){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=i.exec(n),s=u?n.slice(0,u.index):n,p=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;p.push(s)}for(var l=0;null!==(u=a.exec(n))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(u[1])}return u&&p.push("["+n.slice(u.index)+"]"),c(p,e,r)}};t.exports=function(t,e){var r=e||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===t||null===t||"undefined"==typeof t)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof t?a(t,r):t,c=r.plainObjects?Object.create(null):{},s=Object.keys(o),p=0;p<s.length;++p){var l=s[p],f=u(l,o[l],r);c=n.merge(c,f,r)}return n.compact(c)}},function(t,e,r){"use strict";var n=r(9),o=r(8),i={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(t){return a.call(t)},skipNulls:!1,strictNullHandling:!1},u=function t(e,r,o,i,a,c,u,s,p,l,f,d){var y=e;if("function"==typeof u)y=u(r,y);else if(y instanceof Date)y=l(y);else if(null===y){if(i)return c&&!d?c(r):r;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||n.isBuffer(y)){if(c){var h=d?r:c(r);return[f(h)+"="+f(c(y))]}return[f(r)+"="+f(String(y))]}var v=[];if("undefined"==typeof y)return v;var b;if(Array.isArray(u))b=u;else{var g=Object.keys(y);b=s?g.sort(s):g}for(var m=0;m<b.length;++m){var w=b[m];a&&null===y[w]||(v=Array.isArray(y)?v.concat(t(y[w],o(r,w),o,i,a,c,u,s,p,l,f,d)):v.concat(t(y[w],r+(p?"."+w:"["+w+"]"),o,i,a,c,u,s,p,l,f,d)))}return v};t.exports=function(t,e){var r=t,n=e||{};if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var a="undefined"==typeof n.delimiter?c.delimiter:n.delimiter,s="boolean"==typeof n.strictNullHandling?n.strictNullHandling:c.strictNullHandling,p="boolean"==typeof n.skipNulls?n.skipNulls:c.skipNulls,l="boolean"==typeof n.encode?n.encode:c.encode,f="function"==typeof n.encoder?n.encoder:c.encoder,d="function"==typeof n.sort?n.sort:null,y="undefined"!=typeof n.allowDots&&n.allowDots,h="function"==typeof n.serializeDate?n.serializeDate:c.serializeDate,v="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:c.encodeValuesOnly;if("undefined"==typeof n.format)n.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,n.format))throw new TypeError("Unknown format option provided.");var b,g,m=o.formatters[n.format];"function"==typeof n.filter?(g=n.filter,r=g("",r)):Array.isArray(n.filter)&&(g=n.filter,b=g);var w=[];if("object"!=typeof r||null===r)return"";var O;O=n.arrayFormat in i?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var j=i[O];b||(b=Object.keys(r)),d&&b.sort(d);for(var x=0;x<b.length;++x){var _=b[x];p&&null===r[_]||(w=w.concat(u(r[_],_,j,s,p,l?f:null,g,d,y,h,m,v)))}return w.join(a)}},function(t,e){function r(){return Object.assign?Object.assign:n}function n(t){"use strict";if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(void 0!==n&&null!==n)for(var o=Object.keys(Object(n)),i=0,a=o.length;i<a;i++){var c=o[i],u=Object.getOwnPropertyDescriptor(n,c);void 0!==u&&u.enumerable&&(e[c]=n[c])}}return e}t.exports={get:r,objectAssignPolyfill:n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){function n(){this.webAuth=null,this.version=o.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}var o=r(11),i=r(2),a=r(47);n.prototype.setWebAuth=function(t){this.webAuth=t},n.prototype.supports=function(t){var e=i.getWindow();return(!!e.cordova||!!e.electron)&&this.extensibilityPoints.indexOf(t)>-1},n.prototype.init=function(){return new a(this.webAuth)},t.exports=n},function(t,e,r){function n(t){this.webAuth=t}var o=r(3),i=r(48);n.prototype.processParams=function(t){return t.redirectUri=o("https://"+t.domain,"mobile"),delete t.owp,t},n.prototype.getPopupHandler=function(){return new i(this.webAuth)},t.exports=n},function(t,e,r){function n(t){this.webAuth=t,this._current_popup=null,this.options=null}var o=r(2),i=r(6),a=r(3);n.prototype.preload=function(t){var e=this,r=o.getWindow(),n=t.url||"about:blank",a=t.popupOptions||{};a.location="yes",delete a.width,delete a.height;var c=i.stringify(a,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=r.open(n,"_blank",c),this._current_popup.kill=function(t){e._current_popup.success=t,this.close(),e._current_popup=null},this._current_popup)},n.prototype.load=function(t,e,r,n){var o=this;this.url=t,this.options=r,this._current_popup?this._current_popup.location.href=t:(r.url=t,this.preload(r)),this.transientErrorHandler=function(t){o.errorHandler(t,n)},this.transientStartHandler=function(t){o.startHandler(t,n)},this.transientExitHandler=function(){o.exitHandler(n)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},n.prototype.errorHandler=function(t,e){this._current_popup&&(this._current_popup.kill(!0),e({error:"window_error",errorDescription:t.message}))},n.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},n.prototype.exitHandler=function(t){this._current_popup&&(this.unhook(),this._current_popup.success||t({error:"window_closed",errorDescription:"Browser window closed"}))},n.prototype.startHandler=function(t,e){var r=this;if(this._current_popup){var n=a("https:",this.webAuth.baseOptions.domain,"/mobile");if(!t.url||0===t.url.indexOf(n+"#")){var o=t.url.split("#");if(1!==o.length){var i={hash:o.pop()};this.options.nonce&&(i.nonce=this.options.nonce),this.webAuth.parseHash(i,function(t,n){(t||n)&&(r._current_popup.kill(!0),e(t,n))})}}}},t.exports=n}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cordova-auth0-plugin",[],e):"object"==typeof exports?exports["cordova-auth0-plugin"]=e():t.CordovaAuth0Plugin=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(46)},function(t,e,r){function n(t,e){return e.reduce(function(e,r){return t[r]&&(e[r]=t[r]),e},{})}function o(t,e){var r=[];for(var n in t)e.indexOf(n)===-1&&r.push(n);return r}function i(t){var e=[];for(var r in t)e.push(t[r]);return e}function a(){var t=i(arguments);return t.unshift({}),v.get().apply(void 0,t)}function c(t,e){return{base:e?n(t,e):t,with:function(t,e){return t=e?n(t,e):t,a(this.base,t)}}}function u(t,e){return Object.keys(t).reduce(function(r,n){return e.indexOf(n)===-1&&(r[n]=t[n]),r},{})}function s(t){for(var e,r="",n=0,o=!0,i=!0;n<t.length;)e=t.charCodeAt(n),!i&&e>=65&&e<=90||!o&&e>=48&&e<=57?(r+="_",r+=t[n].toLowerCase()):r+=t[n].toLowerCase(),o=e>=48&&e<=57,i=e>=65&&e<=90,n++;return r}function p(t){var e=t.split("_");return e.reduce(function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},e.shift())}function l(t,e){return"object"!=typeof t||h.isArray(t)||null===t?t:(e=e||[],Object.keys(t).reduce(function(r,n){var o=e.indexOf(n)===-1?s(n):n;return r[o]=l(t[n]),r},{}))}function f(t,e){return"object"!=typeof t||h.isArray(t)||null===t?t:(e=e||[],Object.keys(t).reduce(function(r,n){var o=e.indexOf(n)===-1?p(n):n;return r[o]=f(t[n]),r},{}))}function d(t){var e=t.match(/^(https?:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return e&&{href:t,protocol:e[1],host:e[2],hostname:e[3],port:e[4],pathname:e[5],search:e[6],hash:e[7]}}function y(t){if(t){var e=d(t),r=e.protocol+"//"+e.hostname;return e.port&&(r+=":"+e.port),r}}var h=r(4),v=r(15);t.exports={toSnakeCase:l,toCamelCase:f,blacklist:u,merge:c,pick:n,getKeysNotIn:o,extend:a,getOriginFromUrl:y,getLocationFromUrl:d}},function(t,e,r){function n(t){i().location=t}function o(){return i().document}function i(){return window}function a(){var t=i().location,e=t.origin;return e||(e=c.getOriginFromUrl(t.href)),e}var c=r(1);t.exports={redirect:n,getDocument:o,getWindow:i,getOrigin:a}},function(t,e,r){var n,o;!function(i,a,c){"undefined"!=typeof t&&t.exports?t.exports=c():(n=c,o="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==o&&(t.exports=o)))}("urljoin",this,function(){function t(t,e){return t=t.replace(/:\//g,"://"),t=t.replace(/([^:\s])\/+/g,"$1/"),t=t.replace(/\/(\?|&|#[^!])/g,"$1"),t=t.replace(/(\?.+)\?/g,"$1&")}return function(){var e=arguments,r={};"object"==typeof arguments[0]&&(e=arguments[0],r=arguments[1]||{});var n=[].slice.call(e,0).join("/");return t(n,r)}})},function(t,e){function r(t,e,r,n){if(r="array"===r?"object":r,t&&typeof t[e]!==r)throw new Error(n)}function n(t,e,r){if(typeof t!==e)throw new Error(r)}function o(t,e,r){if(e.indexOf(t)===-1)throw new Error(r)}function i(t,e,i){if(e.optional&&!t||n(t,e.type,e.message),"object"===e.type&&i)for(var a=Object.keys(i),c=0;c<a.length;c++){var u=a[c];i[u].optional&&!t[u]||i[u].condition&&!i[u].condition(t)||(r(t,u,i[u].type,i[u].message),i[u].values&&o(t[u],i[u].values,i[u].value_message))}}function a(t){return this.supportsIsArray()?Array.isArray(t):"[object Array]"===u.call(t)}function c(){return null!=Array.isArray}var u=Object.prototype.toString;t.exports={check:i,attribute:r,variable:n,value:o,isArray:a,supportsIsArray:c}},,function(t,e,r){"use strict";var n=r(14),o=r(13),i=r(8);t.exports={formats:i,parse:o,stringify:n}},,function(t,e){"use strict";var r=String.prototype.replace,n=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(t){return r.call(t,n,"+")},RFC3986:function(t){return t}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(t,e){"use strict";var r=Object.prototype.hasOwnProperty,n=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}();e.arrayToObject=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)"undefined"!=typeof t[n]&&(r[n]=t[n]);return r},e.merge=function(t,n,o){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var i=t;return Array.isArray(t)&&!Array.isArray(n)&&(i=e.arrayToObject(t,o)),Array.isArray(t)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(t,i)?t[i]&&"object"==typeof t[i]?t[i]=e.merge(t[i],n,o):t.push(n):t[i]=n}),t):Object.keys(n).reduce(function(t,r){var i=n[r];return Object.prototype.hasOwnProperty.call(t,r)?t[r]=e.merge(t[r],i,o):t[r]=i,t},i)},e.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},e.encode=function(t){if(0===t.length)return t;for(var e="string"==typeof t?t:String(t),r="",o=0;o<e.length;++o){var i=e.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=e.charAt(o):i<128?r+=n[i]:i<2048?r+=n[192|i>>6]+n[128|63&i]:i<55296||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&e.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},e.compact=function(t,r){if("object"!=typeof t||null===t)return t;var n=r||[],o=n.indexOf(t);if(o!==-1)return n[o];if(n.push(t),Array.isArray(t)){for(var i=[],a=0;a<t.length;++a)t[a]&&"object"==typeof t[a]?i.push(e.compact(t[a],n)):"undefined"!=typeof t[a]&&i.push(t[a]);return i}var c=Object.keys(t);return c.forEach(function(r){t[r]=e.compact(t[r],n)}),t},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.isBuffer=function(t){return null!==t&&"undefined"!=typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},,function(t,e){t.exports={raw:"9.6.1"}},,function(t,e,r){"use strict";var n=r(9),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(t,e){for(var r={},n=t.split(e.delimiter,e.parameterLimit===1/0?void 0:e.parameterLimit),i=0;i<n.length;++i){var a,c,u=n[i],s=u.indexOf("]=")===-1?u.indexOf("="):u.indexOf("]=")+1;s===-1?(a=e.decoder(u),c=e.strictNullHandling?null:""):(a=e.decoder(u.slice(0,s)),c=e.decoder(u.slice(s+1))),o.call(r,a)?r[a]=[].concat(r[a]).concat(c):r[a]=c}return r},c=function(t,e,r){if(!t.length)return e;var n,o=t.shift();if("[]"===o)n=[],n=n.concat(c(t,e,r));else{n=r.plainObjects?Object.create(null):{};var i="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,a=parseInt(i,10);!isNaN(a)&&o!==i&&String(a)===i&&a>=0&&r.parseArrays&&a<=r.arrayLimit?(n=[],n[a]=c(t,e,r)):n[i]=c(t,e,r)}return n},u=function(t,e,r){if(t){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=i.exec(n),s=u?n.slice(0,u.index):n,p=[];if(s){if(!r.plainObjects&&o.call(Object.prototype,s)&&!r.allowPrototypes)return;p.push(s)}for(var l=0;null!==(u=a.exec(n))&&l<r.depth;){if(l+=1,!r.plainObjects&&o.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;p.push(u[1])}return u&&p.push("["+n.slice(u.index)+"]"),c(p,e,r)}};t.exports=function(t,e){var r=e||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===t||null===t||"undefined"==typeof t)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof t?a(t,r):t,c=r.plainObjects?Object.create(null):{},s=Object.keys(o),p=0;p<s.length;++p){var l=s[p],f=u(l,o[l],r);c=n.merge(c,f,r)}return n.compact(c)}},function(t,e,r){"use strict";var n=r(9),o=r(8),i={brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(t){return a.call(t)},skipNulls:!1,strictNullHandling:!1},u=function t(e,r,o,i,a,c,u,s,p,l,f,d){var y=e;if("function"==typeof u)y=u(r,y);else if(y instanceof Date)y=l(y);else if(null===y){if(i)return c&&!d?c(r):r;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||n.isBuffer(y)){if(c){var h=d?r:c(r);return[f(h)+"="+f(c(y))]}return[f(r)+"="+f(String(y))]}var v=[];if("undefined"==typeof y)return v;var b;if(Array.isArray(u))b=u;else{var g=Object.keys(y);b=s?g.sort(s):g}for(var m=0;m<b.length;++m){var O=b[m];a&&null===y[O]||(v=Array.isArray(y)?v.concat(t(y[O],o(r,O),o,i,a,c,u,s,p,l,f,d)):v.concat(t(y[O],r+(p?"."+O:"["+O+"]"),o,i,a,c,u,s,p,l,f,d)))}return v};t.exports=function(t,e){var r=t,n=e||{};if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var a="undefined"==typeof n.delimiter?c.delimiter:n.delimiter,s="boolean"==typeof n.strictNullHandling?n.strictNullHandling:c.strictNullHandling,p="boolean"==typeof n.skipNulls?n.skipNulls:c.skipNulls,l="boolean"==typeof n.encode?n.encode:c.encode,f="function"==typeof n.encoder?n.encoder:c.encoder,d="function"==typeof n.sort?n.sort:null,y="undefined"!=typeof n.allowDots&&n.allowDots,h="function"==typeof n.serializeDate?n.serializeDate:c.serializeDate,v="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:c.encodeValuesOnly;if("undefined"==typeof n.format)n.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,n.format))throw new TypeError("Unknown format option provided.");var b,g,m=o.formatters[n.format];"function"==typeof n.filter?(g=n.filter,r=g("",r)):Array.isArray(n.filter)&&(g=n.filter,b=g);var O=[];if("object"!=typeof r||null===r)return"";var w;w=n.arrayFormat in i?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var j=i[w];b||(b=Object.keys(r)),d&&b.sort(d);for(var x=0;x<b.length;++x){var _=b[x];p&&null===r[_]||(O=O.concat(u(r[_],_,j,s,p,l?f:null,g,d,y,h,m,v)))}return O.join(a)}},function(t,e){function r(){return Object.assign?Object.assign:n}function n(t){"use strict";if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),r=1;r<arguments.length;r++){var n=arguments[r];if(void 0!==n&&null!==n)for(var o=Object.keys(Object(n)),i=0,a=o.length;i<a;i++){var c=o[i],u=Object.getOwnPropertyDescriptor(n,c);void 0!==u&&u.enumerable&&(e[c]=n[c])}}return e}t.exports={get:r,objectAssignPolyfill:n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){function n(){this.webAuth=null,this.version=o.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}var o=r(11),i=r(2),a=r(47);n.prototype.setWebAuth=function(t){this.webAuth=t},n.prototype.supports=function(t){var e=i.getWindow();return(!!e.cordova||!!e.electron)&&this.extensibilityPoints.indexOf(t)>-1},n.prototype.init=function(){return new a(this.webAuth)},t.exports=n},function(t,e,r){function n(t){this.webAuth=t}var o=r(3),i=r(48);n.prototype.processParams=function(t){return t.redirectUri=o("https://"+t.domain,"mobile"),delete t.owp,t},n.prototype.getPopupHandler=function(){return new i(this.webAuth)},t.exports=n},function(t,e,r){function n(t){this.webAuth=t,this._current_popup=null,this.options=null}var o=r(2),i=r(6),a=r(3);n.prototype.preload=function(t){var e=this,r=o.getWindow(),n=t.url||"about:blank",a=t.popupOptions||{};a.location="yes",delete a.width,delete a.height;var c=i.stringify(a,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=r.open(n,"_blank",c),this._current_popup.kill=function(t){e._current_popup.success=t,this.close(),e._current_popup=null},this._current_popup)},n.prototype.load=function(t,e,r,n){var o=this;this.url=t,this.options=r,this._current_popup?this._current_popup.location.href=t:(r.url=t,this.preload(r)),this.transientErrorHandler=function(t){o.errorHandler(t,n)},this.transientStartHandler=function(t){o.startHandler(t,n)},this.transientExitHandler=function(){o.exitHandler(n)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},n.prototype.errorHandler=function(t,e){this._current_popup&&(this._current_popup.kill(!0),e({error:"window_error",errorDescription:t.message}))},n.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},n.prototype.exitHandler=function(t){this._current_popup&&(this.unhook(),this._current_popup.success||t({error:"window_closed",errorDescription:"Browser window closed"}))},n.prototype.startHandler=function(t,e){var r=this;if(this._current_popup){var n=a("https:",this.webAuth.baseOptions.domain,"/mobile");if(!t.url||0===t.url.indexOf(n+"#")){var o=t.url.split("#");if(1!==o.length){var i={hash:o.pop()};this.options.nonce&&(i.nonce=this.options.nonce),this.webAuth.parseHash(i,function(t,n){(t||n)&&(r._current_popup.kill(!0),e(t,n))})}}}},t.exports=n}])});
//# sourceMappingURL=cordova-auth0-plugin.min.js.map
## [v9.6.1](https://github.com/auth0/auth0.js/tree/v9.6.1) (2018-06-07)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.6.0...v9.6.1)
**Fixed**
- Remove global from window helpers [\#764](https://github.com/auth0/auth0.js/pull/764) ([fetis](https://github.com/fetis))
## [v9.6.0](https://github.com/auth0/auth0.js/tree/v9.6.0) (2018-05-28)

@@ -3,0 +9,0 @@ [Full Changelog](https://github.com/auth0/auth0.js/compare/v9.5.1...v9.6.0)

{
"name": "auth0-js",
"version": "9.6.0",
"version": "9.6.1",
"description": "Auth0 headless browser sdk",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -23,3 +23,3 @@ ![](https://cdn.auth0.com/resources/oss-source-large-2x.png)

<!-- Latest patch release -->
<script src="https://cdn.auth0.com/js/auth0/9.6.0/auth0.min.js"></script>
<script src="https://cdn.auth0.com/js/auth0/9.6.1/auth0.min.js"></script>
```

@@ -26,0 +26,0 @@

@@ -215,3 +215,3 @@ var urljoin = require('url-join');

* @param {Error} [err] error returned by Auth0 with the reason of the Auth failure
* @param {Object} [result] result of the Auth request
* @param {Object} [result] result of the Auth request. If there is no token available, this value will be null.
* @param {String} [result.accessToken] token that allows access to the specified resource server (identified by the audience parameter or by default Auth0's /userinfo endpoint)

@@ -218,0 +218,0 @@ * @param {Number} [result.expiresIn] number of seconds until the access token expires

var objectHelper = require('./object');
function redirect(url) {
global.window.location = url;
getWindow().location = url;
}
function getDocument() {
return global.window.document;
return getWindow().document;
}
function getWindow() {
return global.window;
return window;
}
function getOrigin() {
var location = global.window.location;
var location = getWindow().location;
var origin = location.origin;
if (!origin) {
origin = objectHelper.getOriginFromUrl(location.href);
}
return origin;

@@ -22,0 +24,0 @@ }

@@ -1,1 +0,1 @@

module.exports = { raw: '9.6.0' };
module.exports = { raw: '9.6.1' };

@@ -5,3 +5,2 @@ var expect = require('expect.js');

var qs = require('qs');
var PopupHandler = require('../../src/helper/popup-handler');

@@ -159,3 +158,3 @@

it('should open the window once', function(done) {
it('should open the window once and return the same instance', function(done) {
var counter = 0;

@@ -177,6 +176,7 @@ global.window.open = function(url, name, windowFeatures) {

var handler = new PopupHandler();
var popup = handler.preload({});
var popup = handler.preload({});
var popup2 = handler.preload({});
expect(popup).to.be(popup2);
popup.kill();

@@ -183,0 +183,0 @@ });

@@ -11,2 +11,6 @@ var expect = require('expect.js');

afterEach(function() {
delete global.window;
});
it('should redirect', function() {

@@ -26,2 +30,3 @@ windowHelper.redirect('http://example.com');

});
describe('getOrigin', function() {

@@ -32,2 +37,3 @@ it('should use window.location.origin when available', function() {

});
it('should build current origin when location.origin is not available', function() {

@@ -34,0 +40,0 @@ global.window = { location: { href: 'http://hostname:30/foobar' } };

before(function() {
function atob(str) {
return new Buffer(str, 'base64').toString('binary');
}
function btoa(str) {
return Buffer.from(str, 'binary').toString('base64');
}
var windowOrGlobal = typeof window !== 'undefined' ? window : global;
windowOrGlobal.atob = atob;
windowOrGlobal.btoa = btoa;
// provide your initial setup here
});
var fs = require('fs');
var webpack = require('webpack');
var CustomVarLibraryNamePlugin = require('webpack-custom-var-library-name-plugin');

@@ -60,2 +59,5 @@

},
node: {
global: false
},
plugins: [

@@ -62,0 +64,0 @@ new CustomVarLibraryNamePlugin({

@@ -60,2 +60,5 @@ var fs = require('fs');

},
node: {
global: false
},
plugins: [

@@ -62,0 +65,0 @@ new CustomVarLibraryNamePlugin({

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc