Socket
Socket
Sign inDemoInstall

auth0-js

Package Overview
Dependencies
Maintainers
8
Versions
263
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.3.3 to 9.3.4

2

build/cordova-auth0-plugin.js

@@ -616,3 +616,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

module.exports = { raw: '9.3.3' };
module.exports = { raw: '9.3.4' };

@@ -619,0 +619,0 @@

/*!
* cordova-auth0-plugin.min.js v9.3.3
* cordova-auth0-plugin.min.js v9.3.4
*
* Author: Auth0
* Date: 3/9/2018, 6:39:25 PM
* Date: 3/22/2018, 5:34:27 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(43)},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(14);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(13),o=r(12),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.3.3"}},,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(10),i=r(2),a=r(44);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(45);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(43)},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(14);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(13),o=r(12),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.3.4"}},,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(10),i=r(2),a=r(44);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(45);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.3.4](https://github.com/auth0/auth0.js/tree/v9.3.4) (2018-03-21)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.3.3...v9.3.4)
**Added**
- Add flag __enableIdPInitiatedLogin to enable idp initiated logins [\#708](https://github.com/auth0/auth0.js/pull/708) ([luisrudge](https://github.com/luisrudge))
## [v9.3.3](https://github.com/auth0/auth0.js/tree/v9.3.3) (2018-03-09)

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

{
"name": "auth0-js",
"version": "9.3.3",
"version": "9.3.4",
"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.3.3/auth0.min.js"></script>
<script src="https://cdn.auth0.com/js/auth0/9.3.4/auth0.min.js"></script>
```

@@ -61,3 +61,3 @@

- **authorize(options)**: Redirects to the `/authorize` endpoint to start an authentication/authorization transaction.
Auth0 will call back to your application with the results at the specified `redirectUri`.
Auth0 will call back to your application with the results at the specified `redirectUri`. **The default scope for this method is `openid profile email`**

@@ -155,3 +155,3 @@ ```js

Provides an API Client for the Auth0 Management API (only methods meant to be used from the client with the user token). You should use an access_token with the `https://YOUR_DOMAIN.auth0.com/api/v2/` audience to make this work. For more information, read [here](https://auth0.com/docs/libraries/lock/v11/migration-legacy-flows#user-profile-with-management-api).
Provides an API Client for the Auth0 Management API (only methods meant to be used from the client with the user token). You should use an access_token with the `https://YOUR_DOMAIN.auth0.com/api/v2/` audience to make this work. For more information, read [the user management section of the Auth0.js documentation](https://auth0.com/docs/libraries/auth0js/v9#user-management).

@@ -158,0 +158,0 @@ ### Initialize

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

* @param {tokenCallback} cb function called with the result of the request
* @see {@link https://auth0.com/docs/api-auth/grant/password}
* @see Requires [`password` grant]{@link https://auth0.com/docs/api-auth/grant/password}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.
*/

@@ -272,3 +272,3 @@ Authentication.prototype.loginWithDefaultDirectory = function(options, cb) {

* @param {tokenCallback} cb function called with the result of the request
* @see {@link https://auth0.com/docs/api-auth/grant/password}
* @see Requires [`http://auth0.com/oauth/grant-type/password-realm` grant]{@link https://auth0.com/docs/api-auth/grant/password#realm-support}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.
*/

@@ -479,2 +479,3 @@ Authentication.prototype.login = function(options, cb) {

* @see {@link https://auth0.com/docs/api/authentication#delegation}
* @see Requires [http://auth0.com/oauth/grant-type/password-realm]{@link https://auth0.com/docs/api-auth/grant/password#realm-support}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.
*/

@@ -481,0 +482,0 @@ Authentication.prototype.delegation = function(options, cb) {

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

module.exports = { raw: '9.3.3' };
module.exports = { raw: '9.3.4' };

@@ -126,2 +126,3 @@ var IdTokenVerifier = require('idtoken-verifier');

* @param {String} [options.nonce] value originally sent in `nonce` parameter to {@link authorize} to prevent replay attacks
* @param {String} [options.responseType] type of the response used by OAuth 2.0 flow. It can be any space separated list of the values `token`, `id_token`. For this specific method, we'll only use this value to check if the hash contains the tokens requested in the responseType.
* @param {authorizeCallback} cb

@@ -164,2 +165,27 @@ */

}
var responseTypes = (this.baseOptions.responseType || options.responseType || '').split(' ');
if (
responseTypes.length > 0 &&
responseTypes.indexOf('token') !== -1 &&
!parsedQs.hasOwnProperty('access_token')
) {
return cb(
error.buildResponse(
'invalid_hash',
'response_type contains `token`, but the parsed hash does not contain an `access_token` property'
)
);
}
if (
responseTypes.length > 0 &&
responseTypes.indexOf('id_token') !== -1 &&
!parsedQs.hasOwnProperty('id_token')
) {
return cb(
error.buildResponse(
'invalid_hash',
'response_type contains `id_token`, but the parsed hash does not contain an `id_token` property'
)
);
}
return this.validateAuthenticationResponse(options, parsedQs, cb);

@@ -184,2 +210,4 @@ };

var _this = this;
options.__enableIdPInitiatedLogin =
options.__enableIdPInitiatedLogin || options.__enableImpersonation;
var state = parsedHash.state;

@@ -190,3 +218,3 @@ var transaction = this.transactionManager.getStoredTransaction(state);

var transactionStateMatchesState = transactionState === state;
var shouldBypassStateChecking = !state && !transactionState && options.__enableImpersonation;
var shouldBypassStateChecking = !state && !transactionState && options.__enableIdPInitiatedLogin;

@@ -563,4 +591,5 @@ if (!shouldBypassStateChecking && !transactionStateMatchesState) {

* After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.
*
*
* @method login
* @see Requires [`Implicit` grant]{@link https://auth0.com/docs/api-auth/grant/implicit}. For more information, read {@link https://auth0.com/docs/clients/client-grant-types}.
* @param {Object} options options used in the {@link authorize} call after the login_ticket is acquired

@@ -567,0 +596,0 @@ * @param {String} [options.username] Username (mutually exclusive with email)

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 too big to display

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