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.11.2 to 9.11.3

46

build/cordova-auth0-plugin.js
/**
* auth0-js v9.11.2
* auth0-js v9.11.3
* Author: Auth0
* Date: 2019-07-15
* Date: 2019-08-05
* License: MIT

@@ -11,6 +11,6 @@ */

typeof define === 'function' && define.amd ? define(factory) :
(global.CordovaAuth0Plugin = factory());
}(this, (function () { 'use strict';
(global = global || self, global.CordovaAuth0Plugin = factory());
}(this, function () { 'use strict';
var version = { raw: '9.11.2' };
var version = { raw: '9.11.3' };

@@ -110,3 +110,7 @@ var toString = Object.prototype.toString;

var keysArray = Object.keys(Object(nextSource));
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
for (
var nextIndex = 0, len = keysArray.length;
nextIndex < len;
nextIndex++
) {
var nextKey = keysArray[nextIndex];

@@ -343,4 +347,3 @@ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);

(function (name, context, definition) {
if (module.exports) module.exports = definition();
else if (typeof undefined === 'function' && undefined.amd) undefined(definition);
if ( module.exports) module.exports = definition();
else context[name] = definition();

@@ -351,3 +354,8 @@ })('urljoin', commonjsGlobal, function () {

var resultArray = [];
if (strArray.length === 0) { return ''; }
if (typeof strArray[0] !== 'string') {
throw new TypeError('Url must be a string. Received ' + strArray[0]);
}
// If the first part is a plain protocol, we combine it with the next part.

@@ -1252,4 +1260,10 @@ if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) {

PopupHandler.prototype.unhook = function() {
this._current_popup.removeEventListener('loaderror', this.transientErrorHandler);
this._current_popup.removeEventListener('loadstart', this.transientStartHandler);
this._current_popup.removeEventListener(
'loaderror',
this.transientErrorHandler
);
this._current_popup.removeEventListener(
'loadstart',
this.transientStartHandler
);
this._current_popup.removeEventListener('exit', this.transientExitHandler);

@@ -1280,3 +1294,7 @@ };

var callbackUrl = urlJoin('https:', this.webAuth.baseOptions.domain, '/mobile');
var callbackUrl = urlJoin(
'https:',
this.webAuth.baseOptions.domain,
'/mobile'
);

@@ -1311,3 +1329,3 @@ if (event.url && !(event.url.indexOf(callbackUrl + '#') === 0)) {

PluginHandler.prototype.processParams = function (params) {
PluginHandler.prototype.processParams = function(params) {
params.redirectUri = urlJoin('https://' + params.domain, 'mobile');

@@ -1318,3 +1336,3 @@ delete params.owp;

PluginHandler.prototype.getPopupHandler = function () {
PluginHandler.prototype.getPopupHandler = function() {
return new PopupHandler(this.webAuth);

@@ -1347,2 +1365,2 @@ };

})));
}));
/**
* auth0-js v9.11.2
* auth0-js v9.11.3
* Author: Auth0
* Date: 2019-07-15
* Date: 2019-08-05
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.CordovaAuth0Plugin=factory()}(this,function(){"use strict";var version={raw:"9.11.2"},toString=Object.prototype.toString;function attribute(o,attr,type,text){if(type="array"===type?"object":type,o&&typeof o[attr]!==type)throw new Error(text)}function variable(o,type,text){if(typeof o!==type)throw new Error(text)}function value(o,values,text){if(-1===values.indexOf(o))throw new Error(text)}var assert={check:function(o,config,attributes){if(config.optional&&!o||variable(o,config.type,config.message),"object"===config.type&&attributes)for(var keys=Object.keys(attributes),index=0;index<keys.length;index++){var a=keys[index];attributes[a].optional&&!o[a]||attributes[a].condition&&!attributes[a].condition(o)||(attribute(o,a,attributes[a].type,attributes[a].message),attributes[a].values&&value(o[a],attributes[a].values,attributes[a].value_message))}},attribute:attribute,variable:variable,value:value,isArray:function(array){return this.supportsIsArray()?Array.isArray(array):"[object Array]"===toString.call(array)},supportsIsArray:function(){return null!=Array.isArray}};function objectAssignPolyfill(target){if(null==target)throw new TypeError("Cannot convert first argument to object");for(var to=Object(target),i=1;i<arguments.length;i++){var nextSource=arguments[i];if(null!=nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex++){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(to[nextKey]=nextSource[nextKey])}}return to}var objectAssign={get:function(){return Object.assign?Object.assign:objectAssignPolyfill},objectAssignPolyfill:objectAssignPolyfill};function pick(object,keys){return keys.reduce(function(prev,key){return object[key]&&(prev[key]=object[key]),prev},{})}function extend(){var params=function(obj){var values=[];for(var key in obj)values.push(obj[key]);return values}(arguments);return params.unshift({}),objectAssign.get().apply(void 0,params)}function getLocationFromUrl(href){var match=href.match(/^(https?:|file:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return match&&{href:href,protocol:match[1],host:match[2],hostname:match[3],port:match[4],pathname:match[5],search:match[6],hash:match[7]}}function trim(options,key){var trimmed=extend(options);return options[key]&&(trimmed[key]=options[key].trim()),trimmed}var objectHelper={toSnakeCase:function toSnakeCase(object,exceptions){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],Object.keys(object).reduce(function(p,key){return p[-1===exceptions.indexOf(key)?function(str){for(var code,newKey="",index=0,wasPrevNumber=!0,wasPrevUppercase=!0;index<str.length;)code=str.charCodeAt(index),!wasPrevUppercase&&code>=65&&code<=90||!wasPrevNumber&&code>=48&&code<=57?(newKey+="_",newKey+=str[index].toLowerCase()):newKey+=str[index].toLowerCase(),wasPrevNumber=code>=48&&code<=57,wasPrevUppercase=code>=65&&code<=90,index++;return newKey}(key):key]=toSnakeCase(object[key]),p},{}))},toCamelCase:function toCamelCase(object,exceptions,options){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],options=options||{},Object.keys(object).reduce(function(p,key){var parts,newKey=-1===exceptions.indexOf(key)?(parts=key.split("_")).reduce(function(p,c){return p+c.charAt(0).toUpperCase()+c.slice(1)},parts.shift()):key;return p[newKey]=toCamelCase(object[newKey]||object[key],[],options),options.keepOriginal&&(p[key]=toCamelCase(object[key],[],options)),p},{}))},blacklist:function(object,blacklistedKeys){return Object.keys(object).reduce(function(p,key){return-1===blacklistedKeys.indexOf(key)&&(p[key]=object[key]),p},{})},merge:function(object,keys){return{base:keys?pick(object,keys):object,with:function(object2,keys2){return object2=keys2?pick(object2,keys2):object2,extend(this.base,object2)}}},pick:pick,getKeysNotIn:function(obj,allowedKeys){var notAllowed=[];for(var key in obj)-1===allowedKeys.indexOf(key)&&notAllowed.push(key);return notAllowed},extend:extend,getOriginFromUrl:function(url){if(url){var parsed=getLocationFromUrl(url),origin=parsed.protocol+"//"+parsed.hostname;return parsed.port&&(origin+=":"+parsed.port),origin}},getLocationFromUrl:getLocationFromUrl,trimUserDetails:function(options){return function(options,keys){return keys.reduce(trim,options)}(options,["username","email","phoneNumber"])}};function getWindow(){return window}var windowHandler={redirect:function(url){getWindow().location=url},getDocument:function(){return getWindow().document},getWindow:getWindow,getOrigin:function(){var location=getWindow().location,origin=location.origin;return origin||(origin=objectHelper.getOriginFromUrl(location.href)),origin}},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var module,urlJoin=(function(module){var context,definition;context=commonjsGlobal,definition=function(){return function(){return function(strArray){var resultArray=[];if(strArray[0].match(/^[^\/:]+:\/*$/)&&strArray.length>1){var first=strArray.shift();strArray[0]=first+strArray[0]}strArray[0].match(/^file:\/\/\//)?strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1:///"):strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1://");for(var i=0;i<strArray.length;i++){var component=strArray[i];if("string"!=typeof component)throw new TypeError("Url must be a string. Received "+component);""!==component&&(i>0&&(component=component.replace(/^[\/]+/,"")),component=i<strArray.length-1?component.replace(/[\/]+$/,""):component.replace(/[\/]+$/,"/"),resultArray.push(component))}var str=resultArray.join("/"),parts=(str=str.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return str=parts.shift()+(parts.length>0?"?":"")+parts.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},module.exports?module.exports=definition():context.urljoin=definition()}(module={exports:{}},module.exports),module.exports),has=Object.prototype.hasOwnProperty,isArray$1=Array.isArray,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}(),arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i<source.length;++i)void 0!==source[i]&&(obj[i]=source[i]);return obj},utils={arrayToObject:arrayToObject,assign:function(target,source){return Object.keys(source).reduce(function(acc,key){return acc[key]=source[key],acc},target)},combine:function(a,b){return[].concat(a,b)},compact:function(value){for(var queue=[{obj:{o:value},prop:"o"}],refs=[],i=0;i<queue.length;++i)for(var item=queue[i],obj=item.obj[item.prop],keys=Object.keys(obj),j=0;j<keys.length;++j){var key=keys[j],val=obj[key];"object"==typeof val&&null!==val&&-1===refs.indexOf(val)&&(queue.push({obj:obj,prop:key}),refs.push(val))}return function(queue){for(;queue.length>1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray$1(obj)){for(var compacted=[],j=0;j<obj.length;++j)void 0!==obj[j]&&compacted.push(obj[j]);item.obj[item.prop]=compacted}}}(queue),value},decode:function(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if("iso-8859-1"===charset)return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(strWithoutPlus)}catch(e){return strWithoutPlus}},encode:function(str,defaultEncoder,charset){if(0===str.length)return str;var string="string"==typeof str?str:String(str);if("iso-8859-1"===charset)return escape(string).replace(/%u[0-9a-f]{4}/gi,function($0){return"%26%23"+parseInt($0.slice(2),16)+"%3B"});for(var out="",i=0;i<string.length;++i){var c=string.charCodeAt(i);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},isBuffer:function(obj){return!(!obj||"object"!=typeof obj||!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))},isRegExp:function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},merge:function merge(target,source,options){if(!source)return target;if("object"!=typeof source){if(isArray$1(target))target.push(source);else{if(!target||"object"!=typeof target)return[target,source];(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source))&&(target[source]=!0)}return target}if(!target||"object"!=typeof target)return[target].concat(source);var mergeTarget=target;return isArray$1(target)&&!isArray$1(source)&&(mergeTarget=arrayToObject(target,options)),isArray$1(target)&&isArray$1(source)?(source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];targetItem&&"object"==typeof targetItem&&item&&"object"==typeof item?target[i]=merge(targetItem,item,options):target.push(item)}else target[i]=item}),target):Object.keys(source).reduce(function(acc,key){var value=source[key];return has.call(acc,key)?acc[key]=merge(acc[key],value,options):acc[key]=value,acc},mergeTarget)}},replace=String.prototype.replace,percentTwenties=/%20/g,formats={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"},has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},comma:"comma",indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},isArray$2=Array.isArray,push=Array.prototype.push,pushToArray=function(arr,valueOrArray){push.apply(arr,isArray$2(valueOrArray)?valueOrArray:[valueOrArray])},toISO=Date.prototype.toISOString,defaults={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils.encode,encodeValuesOnly:!1,formatter:formats.formatters[formats.default],indices:!1,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},stringify=function stringify(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset){var obj=object;if("function"==typeof filter?obj=filter(prefix,obj):obj instanceof Date?obj=serializeDate(obj):"comma"===generateArrayPrefix&&isArray$2(obj)&&(obj=obj.join(",")),null===obj){if(strictNullHandling)return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset):prefix;obj=""}if("string"==typeof obj||"number"==typeof obj||"boolean"==typeof obj||utils.isBuffer(obj))return encoder?[formatter(encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset))+"="+formatter(encoder(obj,defaults.encoder,charset))]:[formatter(prefix)+"="+formatter(String(obj))];var objKeys,values=[];if(void 0===obj)return values;if(isArray$2(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(isArray$2(obj)?pushToArray(values,stringify(obj[key],"function"==typeof generateArrayPrefix?generateArrayPrefix(prefix,key):prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)):pushToArray(values,stringify(obj[key],prefix+(allowDots?"."+key:"["+key+"]"),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)))}return values},lib_stringify=(Object.prototype.hasOwnProperty,function(object,opts){var objKeys,obj=object,options=function(opts){if(!opts)return defaults;if(null!==opts.encoder&&void 0!==opts.encoder&&"function"!=typeof opts.encoder)throw new TypeError("Encoder has to be a function.");var charset=opts.charset||defaults.charset;if(void 0!==opts.charset&&"utf-8"!==opts.charset&&"iso-8859-1"!==opts.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var format=formats.default;if(void 0!==opts.format){if(!has$1.call(formats.formatters,opts.format))throw new TypeError("Unknown format option provided.");format=opts.format}var formatter=formats.formatters[format],filter=defaults.filter;return("function"==typeof opts.filter||isArray$2(opts.filter))&&(filter=opts.filter),{addQueryPrefix:"boolean"==typeof opts.addQueryPrefix?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:void 0===opts.allowDots?defaults.allowDots:!!opts.allowDots,charset:charset,charsetSentinel:"boolean"==typeof opts.charsetSentinel?opts.charsetSentinel:defaults.charsetSentinel,delimiter:void 0===opts.delimiter?defaults.delimiter:opts.delimiter,encode:"boolean"==typeof opts.encode?opts.encode:defaults.encode,encoder:"function"==typeof opts.encoder?opts.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof opts.encodeValuesOnly?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,formatter:formatter,serializeDate:"function"==typeof opts.serializeDate?opts.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof opts.skipNulls?opts.skipNulls:defaults.skipNulls,sort:"function"==typeof opts.sort?opts.sort:null,strictNullHandling:"boolean"==typeof opts.strictNullHandling?opts.strictNullHandling:defaults.strictNullHandling}}(opts);"function"==typeof options.filter?obj=(0,options.filter)("",obj):isArray$2(options.filter)&&(objKeys=options.filter);var arrayFormat,keys=[];if("object"!=typeof obj||null===obj)return"";arrayFormat=opts&&opts.arrayFormat in arrayPrefixGenerators?opts.arrayFormat:opts&&"indices"in opts?opts.indices?"indices":"repeat":"indices";var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];objKeys||(objKeys=Object.keys(obj)),options.sort&&objKeys.sort(options.sort);for(var i=0;i<objKeys.length;++i){var key=objKeys[i];options.skipNulls&&null===obj[key]||pushToArray(keys,stringify(obj[key],key,generateArrayPrefix,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.formatter,options.encodeValuesOnly,options.charset))}var joined=keys.join(options.delimiter),prefix=!0===options.addQueryPrefix?"?":"";return options.charsetSentinel&&("iso-8859-1"===options.charset?prefix+="utf8=%26%2310003%3B&":prefix+="utf8=%E2%9C%93&"),joined.length>0?prefix+joined:""});function PopupHandler(webAuth){this.webAuth=webAuth,this._current_popup=null,this.options=null}function PluginHandler(webAuth){this.webAuth=webAuth}function CordovaPlugin(){this.webAuth=null,this.version=version.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return PopupHandler.prototype.preload=function(options){var _this=this,_window=windowHandler.getWindow(),url=options.url||"about:blank",popupOptions=options.popupOptions||{};popupOptions.location="yes",delete popupOptions.width,delete popupOptions.height;var windowFeatures=lib_stringify(popupOptions,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=_window.open(url,"_blank",windowFeatures),this._current_popup.kill=function(success){_this._current_popup.success=success,this.close(),_this._current_popup=null},this._current_popup)},PopupHandler.prototype.load=function(url,_,options,cb){var _this=this;this.url=url,this.options=options,this._current_popup?this._current_popup.location.href=url:(options.url=url,this.preload(options)),this.transientErrorHandler=function(event){_this.errorHandler(event,cb)},this.transientStartHandler=function(event){_this.startHandler(event,cb)},this.transientExitHandler=function(){_this.exitHandler(cb)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.errorHandler=function(event,cb){this._current_popup&&(this._current_popup.kill(!0),cb({error:"window_error",errorDescription:event.message}))},PopupHandler.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.exitHandler=function(cb){this._current_popup&&(this.unhook(),this._current_popup.success||cb({error:"window_closed",errorDescription:"Browser window closed"}))},PopupHandler.prototype.startHandler=function(event,cb){var _this=this;if(this._current_popup){var callbackUrl=urlJoin("https:",this.webAuth.baseOptions.domain,"/mobile");if(!event.url||0===event.url.indexOf(callbackUrl+"#")){var parts=event.url.split("#");if(1!==parts.length){var opts={hash:parts.pop()};this.options.nonce&&(opts.nonce=this.options.nonce),this.webAuth.parseHash(opts,function(error,result){(error||result)&&(_this._current_popup.kill(!0),cb(error,result))})}}}},PluginHandler.prototype.processParams=function(params){return params.redirectUri=urlJoin("https://"+params.domain,"mobile"),delete params.owp,params},PluginHandler.prototype.getPopupHandler=function(){return new PopupHandler(this.webAuth)},CordovaPlugin.prototype.setWebAuth=function(webAuth){this.webAuth=webAuth},CordovaPlugin.prototype.supports=function(extensibilityPoint){var _window=windowHandler.getWindow();return(!!_window.cordova||!!_window.electron)&&this.extensibilityPoints.indexOf(extensibilityPoint)>-1},CordovaPlugin.prototype.init=function(){return new PluginHandler(this.webAuth)},CordovaPlugin});
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global=global||self).CordovaAuth0Plugin=factory()}(this,function(){"use strict";var version={raw:"9.11.3"},toString=Object.prototype.toString;function attribute(o,attr,type,text){if(type="array"===type?"object":type,o&&typeof o[attr]!==type)throw new Error(text)}function variable(o,type,text){if(typeof o!==type)throw new Error(text)}function value(o,values,text){if(-1===values.indexOf(o))throw new Error(text)}var assert={check:function(o,config,attributes){if(config.optional&&!o||variable(o,config.type,config.message),"object"===config.type&&attributes)for(var keys=Object.keys(attributes),index=0;index<keys.length;index++){var a=keys[index];attributes[a].optional&&!o[a]||attributes[a].condition&&!attributes[a].condition(o)||(attribute(o,a,attributes[a].type,attributes[a].message),attributes[a].values&&value(o[a],attributes[a].values,attributes[a].value_message))}},attribute:attribute,variable:variable,value:value,isArray:function(array){return this.supportsIsArray()?Array.isArray(array):"[object Array]"===toString.call(array)},supportsIsArray:function(){return null!=Array.isArray}};function objectAssignPolyfill(target){if(null==target)throw new TypeError("Cannot convert first argument to object");for(var to=Object(target),i=1;i<arguments.length;i++){var nextSource=arguments[i];if(null!=nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex++){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(to[nextKey]=nextSource[nextKey])}}return to}var objectAssign={get:function(){return Object.assign?Object.assign:objectAssignPolyfill},objectAssignPolyfill:objectAssignPolyfill};function pick(object,keys){return keys.reduce(function(prev,key){return object[key]&&(prev[key]=object[key]),prev},{})}function extend(){var params=function(obj){var values=[];for(var key in obj)values.push(obj[key]);return values}(arguments);return params.unshift({}),objectAssign.get().apply(void 0,params)}function getLocationFromUrl(href){var match=href.match(/^(https?:|file:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return match&&{href:href,protocol:match[1],host:match[2],hostname:match[3],port:match[4],pathname:match[5],search:match[6],hash:match[7]}}function trim(options,key){var trimmed=extend(options);return options[key]&&(trimmed[key]=options[key].trim()),trimmed}var objectHelper={toSnakeCase:function toSnakeCase(object,exceptions){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],Object.keys(object).reduce(function(p,key){return p[-1===exceptions.indexOf(key)?function(str){for(var code,newKey="",index=0,wasPrevNumber=!0,wasPrevUppercase=!0;index<str.length;)code=str.charCodeAt(index),!wasPrevUppercase&&code>=65&&code<=90||!wasPrevNumber&&code>=48&&code<=57?(newKey+="_",newKey+=str[index].toLowerCase()):newKey+=str[index].toLowerCase(),wasPrevNumber=code>=48&&code<=57,wasPrevUppercase=code>=65&&code<=90,index++;return newKey}(key):key]=toSnakeCase(object[key]),p},{}))},toCamelCase:function toCamelCase(object,exceptions,options){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],options=options||{},Object.keys(object).reduce(function(p,key){var parts,newKey=-1===exceptions.indexOf(key)?(parts=key.split("_")).reduce(function(p,c){return p+c.charAt(0).toUpperCase()+c.slice(1)},parts.shift()):key;return p[newKey]=toCamelCase(object[newKey]||object[key],[],options),options.keepOriginal&&(p[key]=toCamelCase(object[key],[],options)),p},{}))},blacklist:function(object,blacklistedKeys){return Object.keys(object).reduce(function(p,key){return-1===blacklistedKeys.indexOf(key)&&(p[key]=object[key]),p},{})},merge:function(object,keys){return{base:keys?pick(object,keys):object,with:function(object2,keys2){return object2=keys2?pick(object2,keys2):object2,extend(this.base,object2)}}},pick:pick,getKeysNotIn:function(obj,allowedKeys){var notAllowed=[];for(var key in obj)-1===allowedKeys.indexOf(key)&&notAllowed.push(key);return notAllowed},extend:extend,getOriginFromUrl:function(url){if(url){var parsed=getLocationFromUrl(url),origin=parsed.protocol+"//"+parsed.hostname;return parsed.port&&(origin+=":"+parsed.port),origin}},getLocationFromUrl:getLocationFromUrl,trimUserDetails:function(options){return function(options,keys){return keys.reduce(trim,options)}(options,["username","email","phoneNumber"])}};function getWindow(){return window}var windowHandler={redirect:function(url){getWindow().location=url},getDocument:function(){return getWindow().document},getWindow:getWindow,getOrigin:function(){var location=getWindow().location,origin=location.origin;return origin||(origin=objectHelper.getOriginFromUrl(location.href)),origin}},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var urlJoin=function(fn,module){return fn(module={exports:{}},module.exports),module.exports}(function(module){var context,definition;context=commonjsGlobal,definition=function(){function normalize(strArray){var resultArray=[];if(0===strArray.length)return"";if("string"!=typeof strArray[0])throw new TypeError("Url must be a string. Received "+strArray[0]);if(strArray[0].match(/^[^\/:]+:\/*$/)&&strArray.length>1){var first=strArray.shift();strArray[0]=first+strArray[0]}strArray[0].match(/^file:\/\/\//)?strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1:///"):strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1://");for(var i=0;i<strArray.length;i++){var component=strArray[i];if("string"!=typeof component)throw new TypeError("Url must be a string. Received "+component);""!==component&&(i>0&&(component=component.replace(/^[\/]+/,"")),component=i<strArray.length-1?component.replace(/[\/]+$/,""):component.replace(/[\/]+$/,"/"),resultArray.push(component))}var str=resultArray.join("/"),parts=(str=str.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return str=parts.shift()+(parts.length>0?"?":"")+parts.join("&")}return function(){return normalize("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},module.exports?module.exports=definition():context.urljoin=definition()}),has=Object.prototype.hasOwnProperty,isArray$1=Array.isArray,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}(),arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i<source.length;++i)void 0!==source[i]&&(obj[i]=source[i]);return obj},utils={arrayToObject:arrayToObject,assign:function(target,source){return Object.keys(source).reduce(function(acc,key){return acc[key]=source[key],acc},target)},combine:function(a,b){return[].concat(a,b)},compact:function(value){for(var queue=[{obj:{o:value},prop:"o"}],refs=[],i=0;i<queue.length;++i)for(var item=queue[i],obj=item.obj[item.prop],keys=Object.keys(obj),j=0;j<keys.length;++j){var key=keys[j],val=obj[key];"object"==typeof val&&null!==val&&-1===refs.indexOf(val)&&(queue.push({obj:obj,prop:key}),refs.push(val))}return function(queue){for(;queue.length>1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray$1(obj)){for(var compacted=[],j=0;j<obj.length;++j)void 0!==obj[j]&&compacted.push(obj[j]);item.obj[item.prop]=compacted}}}(queue),value},decode:function(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if("iso-8859-1"===charset)return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(strWithoutPlus)}catch(e){return strWithoutPlus}},encode:function(str,defaultEncoder,charset){if(0===str.length)return str;var string="string"==typeof str?str:String(str);if("iso-8859-1"===charset)return escape(string).replace(/%u[0-9a-f]{4}/gi,function($0){return"%26%23"+parseInt($0.slice(2),16)+"%3B"});for(var out="",i=0;i<string.length;++i){var c=string.charCodeAt(i);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},isBuffer:function(obj){return!(!obj||"object"!=typeof obj||!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))},isRegExp:function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},merge:function merge(target,source,options){if(!source)return target;if("object"!=typeof source){if(isArray$1(target))target.push(source);else{if(!target||"object"!=typeof target)return[target,source];(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source))&&(target[source]=!0)}return target}if(!target||"object"!=typeof target)return[target].concat(source);var mergeTarget=target;return isArray$1(target)&&!isArray$1(source)&&(mergeTarget=arrayToObject(target,options)),isArray$1(target)&&isArray$1(source)?(source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];targetItem&&"object"==typeof targetItem&&item&&"object"==typeof item?target[i]=merge(targetItem,item,options):target.push(item)}else target[i]=item}),target):Object.keys(source).reduce(function(acc,key){var value=source[key];return has.call(acc,key)?acc[key]=merge(acc[key],value,options):acc[key]=value,acc},mergeTarget)}},replace=String.prototype.replace,percentTwenties=/%20/g,formats={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"},has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},comma:"comma",indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},isArray$2=Array.isArray,push=Array.prototype.push,pushToArray=function(arr,valueOrArray){push.apply(arr,isArray$2(valueOrArray)?valueOrArray:[valueOrArray])},toISO=Date.prototype.toISOString,defaults={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils.encode,encodeValuesOnly:!1,formatter:formats.formatters[formats.default],indices:!1,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},stringify=function stringify(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset){var obj=object;if("function"==typeof filter?obj=filter(prefix,obj):obj instanceof Date?obj=serializeDate(obj):"comma"===generateArrayPrefix&&isArray$2(obj)&&(obj=obj.join(",")),null===obj){if(strictNullHandling)return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset):prefix;obj=""}if("string"==typeof obj||"number"==typeof obj||"boolean"==typeof obj||utils.isBuffer(obj))return encoder?[formatter(encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset))+"="+formatter(encoder(obj,defaults.encoder,charset))]:[formatter(prefix)+"="+formatter(String(obj))];var objKeys,values=[];if(void 0===obj)return values;if(isArray$2(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(isArray$2(obj)?pushToArray(values,stringify(obj[key],"function"==typeof generateArrayPrefix?generateArrayPrefix(prefix,key):prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)):pushToArray(values,stringify(obj[key],prefix+(allowDots?"."+key:"["+key+"]"),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)))}return values},lib_stringify=(Object.prototype.hasOwnProperty,function(object,opts){var objKeys,obj=object,options=function(opts){if(!opts)return defaults;if(null!==opts.encoder&&void 0!==opts.encoder&&"function"!=typeof opts.encoder)throw new TypeError("Encoder has to be a function.");var charset=opts.charset||defaults.charset;if(void 0!==opts.charset&&"utf-8"!==opts.charset&&"iso-8859-1"!==opts.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var format=formats.default;if(void 0!==opts.format){if(!has$1.call(formats.formatters,opts.format))throw new TypeError("Unknown format option provided.");format=opts.format}var formatter=formats.formatters[format],filter=defaults.filter;return("function"==typeof opts.filter||isArray$2(opts.filter))&&(filter=opts.filter),{addQueryPrefix:"boolean"==typeof opts.addQueryPrefix?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:void 0===opts.allowDots?defaults.allowDots:!!opts.allowDots,charset:charset,charsetSentinel:"boolean"==typeof opts.charsetSentinel?opts.charsetSentinel:defaults.charsetSentinel,delimiter:void 0===opts.delimiter?defaults.delimiter:opts.delimiter,encode:"boolean"==typeof opts.encode?opts.encode:defaults.encode,encoder:"function"==typeof opts.encoder?opts.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof opts.encodeValuesOnly?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,formatter:formatter,serializeDate:"function"==typeof opts.serializeDate?opts.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof opts.skipNulls?opts.skipNulls:defaults.skipNulls,sort:"function"==typeof opts.sort?opts.sort:null,strictNullHandling:"boolean"==typeof opts.strictNullHandling?opts.strictNullHandling:defaults.strictNullHandling}}(opts);"function"==typeof options.filter?obj=(0,options.filter)("",obj):isArray$2(options.filter)&&(objKeys=options.filter);var arrayFormat,keys=[];if("object"!=typeof obj||null===obj)return"";arrayFormat=opts&&opts.arrayFormat in arrayPrefixGenerators?opts.arrayFormat:opts&&"indices"in opts?opts.indices?"indices":"repeat":"indices";var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];objKeys||(objKeys=Object.keys(obj)),options.sort&&objKeys.sort(options.sort);for(var i=0;i<objKeys.length;++i){var key=objKeys[i];options.skipNulls&&null===obj[key]||pushToArray(keys,stringify(obj[key],key,generateArrayPrefix,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.formatter,options.encodeValuesOnly,options.charset))}var joined=keys.join(options.delimiter),prefix=!0===options.addQueryPrefix?"?":"";return options.charsetSentinel&&("iso-8859-1"===options.charset?prefix+="utf8=%26%2310003%3B&":prefix+="utf8=%E2%9C%93&"),joined.length>0?prefix+joined:""});function PopupHandler(webAuth){this.webAuth=webAuth,this._current_popup=null,this.options=null}function PluginHandler(webAuth){this.webAuth=webAuth}function CordovaPlugin(){this.webAuth=null,this.version=version.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return PopupHandler.prototype.preload=function(options){var _this=this,_window=windowHandler.getWindow(),url=options.url||"about:blank",popupOptions=options.popupOptions||{};popupOptions.location="yes",delete popupOptions.width,delete popupOptions.height;var windowFeatures=lib_stringify(popupOptions,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=_window.open(url,"_blank",windowFeatures),this._current_popup.kill=function(success){_this._current_popup.success=success,this.close(),_this._current_popup=null},this._current_popup)},PopupHandler.prototype.load=function(url,_,options,cb){var _this=this;this.url=url,this.options=options,this._current_popup?this._current_popup.location.href=url:(options.url=url,this.preload(options)),this.transientErrorHandler=function(event){_this.errorHandler(event,cb)},this.transientStartHandler=function(event){_this.startHandler(event,cb)},this.transientExitHandler=function(){_this.exitHandler(cb)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.errorHandler=function(event,cb){this._current_popup&&(this._current_popup.kill(!0),cb({error:"window_error",errorDescription:event.message}))},PopupHandler.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.exitHandler=function(cb){this._current_popup&&(this.unhook(),this._current_popup.success||cb({error:"window_closed",errorDescription:"Browser window closed"}))},PopupHandler.prototype.startHandler=function(event,cb){var _this=this;if(this._current_popup){var callbackUrl=urlJoin("https:",this.webAuth.baseOptions.domain,"/mobile");if(!event.url||0===event.url.indexOf(callbackUrl+"#")){var parts=event.url.split("#");if(1!==parts.length){var opts={hash:parts.pop()};this.options.nonce&&(opts.nonce=this.options.nonce),this.webAuth.parseHash(opts,function(error,result){(error||result)&&(_this._current_popup.kill(!0),cb(error,result))})}}}},PluginHandler.prototype.processParams=function(params){return params.redirectUri=urlJoin("https://"+params.domain,"mobile"),delete params.owp,params},PluginHandler.prototype.getPopupHandler=function(){return new PopupHandler(this.webAuth)},CordovaPlugin.prototype.setWebAuth=function(webAuth){this.webAuth=webAuth},CordovaPlugin.prototype.supports=function(extensibilityPoint){var _window=windowHandler.getWindow();return(!!_window.cordova||!!_window.electron)&&this.extensibilityPoints.indexOf(extensibilityPoint)>-1},CordovaPlugin.prototype.init=function(){return new PluginHandler(this.webAuth)},CordovaPlugin});
//# sourceMappingURL=cordova-auth0-plugin.min.js.map

@@ -0,45 +1,67 @@

## [v9.11.3](https://github.com/auth0/auth0.js/tree/v9.11.3) (2019-07-23)
**Fixed**
Use cdn-uploader from NPM.
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.11.2...v9.11.3)
## [v9.11.2](https://github.com/auth0/auth0.js/tree/v9.11.2) (2019-07-15)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.11.1...v9.11.2)
**Fixed**
- Upgrade idtoken-verifier to fix importing auth0.js in SSR apps [\#965](https://github.com/auth0/auth0.js/pull/965) ([luisrudge](https://github.com/luisrudge))
## [v9.11.1](https://github.com/auth0/auth0.js/tree/v9.11.1) (2019-06-27)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.11.0...v9.11.1)
**Fixed**
- Fix nonce error when id_token doesn't have a nonce [\#954](https://github.com/auth0/auth0.js/pull/954) ([luisrudge](https://github.com/luisrudge))
## [v9.11.0](https://github.com/auth0/auth0.js/tree/v9.11.0) (2019-06-25)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.10.4...v9.11.0)
**Added**
- Add method to patch root user attributes [\#949](https://github.com/auth0/auth0.js/pull/949) ([luisrudge](https://github.com/luisrudge))
**Changed**
- Fix/check nonce state hs256 tokens [\#952](https://github.com/auth0/auth0.js/pull/952) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- Ignore syntax errors from popups [\#948](https://github.com/auth0/auth0.js/pull/948) ([luisrudge](https://github.com/luisrudge))
## [v9.10.4](https://github.com/auth0/auth0.js/tree/v9.10.4) (2019-05-24)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.10.3...v9.10.4)
**Fixed**
- Fix checksession success response casing [\#943](https://github.com/auth0/auth0.js/pull/943) ([luisrudge](https://github.com/luisrudge))
## [v9.10.3](https://github.com/auth0/auth0.js/tree/v9.10.3) (2019-05-22)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.10.2...v9.10.3)
## [v9.10.2](https://github.com/auth0/auth0.js/tree/v9.10.2) (2019-04-15)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.10.1...v9.10.2)
**Changed**
- Modify telemetry inside the ULP [\#922](https://github.com/auth0/auth0.js/pull/922) ([luisrudge](https://github.com/luisrudge))
## [v9.10.1](https://github.com/auth0/auth0.js/tree/v9.10.1) (2019-03-18)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.10.0...v9.10.1)
**Fixed**
- Throw nonce error when using HS256 id_tokens [\#913](https://github.com/auth0/auth0.js/pull/913) ([luisrudge](https://github.com/luisrudge))

@@ -49,23 +71,31 @@ - Fix different id_token payload casing between authorize and popup.authorize [\#911](https://github.com/auth0/auth0.js/pull/911) ([luisrudge](https://github.com/luisrudge))

## [v9.10.0](https://github.com/auth0/auth0.js/tree/v9.10.0) (2019-01-28)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.9.1...v9.10.0)
**Changed**
- Trim `username`, `email` and `phoneNumber` params in every request [\#895](https://github.com/auth0/auth0.js/pull/895) ([ScottRudiger](https://github.com/ScottRudiger))
## [v9.9.1](https://github.com/auth0/auth0.js/tree/v9.9.1) (2019-01-23)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.9.0...v9.9.1)
**Fixed**
- Don't store transactions when inside the hosted login page [\#899](https://github.com/auth0/auth0.js/pull/899) ([luisrudge](https://github.com/luisrudge))
## [v9.9.0](https://github.com/auth0/auth0.js/tree/v9.9.0) (2019-01-10)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.8.2...v9.9.0)
**Fixed**
- Don't use storage when inside the Universal Login Page [\#889](https://github.com/auth0/auth0.js/pull/889) ([luisrudge](https://github.com/luisrudge))
## [v9.8.2](https://github.com/auth0/auth0.js/tree/v9.8.2) (2018-11-13)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.8.1...v9.8.2)
**Fixed**
- Prevent checkSession to be called without a redirect_uri [\#851](https://github.com/auth0/auth0.js/pull/851) ([ojas360](https://github.com/ojas360))

@@ -75,5 +105,7 @@ - Parse file protocol from Url [\#846](https://github.com/auth0/auth0.js/pull/846) ([anion155](https://github.com/anion155))

## [v9.8.1](https://github.com/auth0/auth0.js/tree/v9.8.1) (2018-10-23)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.8.0...v9.8.1)
**Fixed**
- Fixed transaction state not being set to expire in 30 minutes [\#835](https://github.com/auth0/auth0.js/pull/835) ([sayuti-daniel](https://github.com/sayuti-daniel))

@@ -83,23 +115,31 @@ - Fix incorrect error wrapping for signup/change password errors [\#829](https://github.com/auth0/auth0.js/pull/829) ([luisrudge](https://github.com/luisrudge))

## [v9.8.0](https://github.com/auth0/auth0.js/tree/v9.8.0) (2018-09-26)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.4-beta1...v9.8.0)
**Released**
- Start using cookies instead of localStorage by default [\#817](https://github.com/auth0/auth0.js/pull/817) ([luisrudge](https://github.com/luisrudge))
## [v9.7.4-beta1](https://github.com/auth0/auth0.js/tree/v9.7.4-beta1) (2018-08-28)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.3...v9.7.4-beta1)
**Changed**
- Start using cookies instead of localStorage by default [\#817](https://github.com/auth0/auth0.js/pull/817) ([luisrudge](https://github.com/luisrudge))
## [v9.7.3](https://github.com/auth0/auth0.js/tree/v9.7.3) (2018-07-23)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.3-beta1...v9.7.3)
**Fixed**
- Fix npm module export [\#808](https://github.com/auth0/auth0.js/pull/808) ([luisrudge](https://github.com/luisrudge))
## [v9.7.3-beta1](https://github.com/auth0/auth0.js/tree/v9.7.3-beta1) (2018-07-18)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.2...v9.7.3-beta1)
**Fixed**
- Fix npm module export [\#808](https://github.com/auth0/auth0.js/pull/808) ([luisrudge](https://github.com/luisrudge))

@@ -109,20 +149,27 @@ - We're testing the new module export to make sure we restore the previous behavior before committing to a patch fix

## [v9.7.2](https://github.com/auth0/auth0.js/tree/v9.7.2) (2018-07-13)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.1...v9.7.2)
**Fixed**
- Fix default export for auth0js [\#803](https://github.com/auth0/auth0.js/pull/803) ([luisrudge](https://github.com/luisrudge))
## [v9.7.1](https://github.com/auth0/auth0.js/tree/v9.7.1) (2018-07-13)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.7.0...v9.7.1)
**Fixed**
- Fix build folder not being published in the tag [\#801](https://github.com/auth0/auth0.js/pull/801) ([luisrudge](https://github.com/luisrudge))
## [v9.7.0](https://github.com/auth0/auth0.js/tree/v9.7.0) (2018-07-12)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.6.1...v9.7.0)
**Added**
- Add SRI hashes to the cdn [\#782](https://github.com/auth0/auth0.js/pull/782) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- options is optional in WebAuth.prototype.authorize [\#789](https://github.com/auth0/auth0.js/pull/789) ([behrangsa](https://github.com/behrangsa))

@@ -132,26 +179,35 @@ - Removing `domain` option from methods (it can't be overridden) [\#781](https://github.com/auth0/auth0.js/pull/781) ([luisrudge](https://github.com/luisrudge))

## [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)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.5.1...v9.6.0)
**Changed**
- Added `access_type` and `display` to the parameters-whitelist [\#760](https://github.com/auth0/auth0.js/pull/760) ([lordnox](https://github.com/lordnox))
**Fixed**
- Clear local state when checkSession call fails [\#758](https://github.com/auth0/auth0.js/pull/758) ([luisrudge](https://github.com/luisrudge))
## [v9.5.1](https://github.com/auth0/auth0.js/tree/v9.5.1) (2018-04-28)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.5.0...v9.5.1)
**Fixed**
- Prevent using window object on initialize [\#746](https://github.com/auth0/auth0.js/pull/746) ([luisrudge](https://github.com/luisrudge))
## [v9.5.0](https://github.com/auth0/auth0.js/tree/v9.5.0) (2018-04-24)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.4.2...v9.5.0)
**Added**
- Add transaction manager to passwordlessLogin and login [\#731](https://github.com/auth0/auth0.js/pull/731) ([luisrudge](https://github.com/luisrudge))

@@ -161,2 +217,3 @@ - Add error message when there is no access_token and id_token is HS256 [\#727](https://github.com/auth0/auth0.js/pull/727) ([luisrudge](https://github.com/luisrudge))

**Fixed**
- Fix storing values when DOM storage is not available [\#737](https://github.com/auth0/auth0.js/pull/737) ([luisrudge](https://github.com/luisrudge))

@@ -167,32 +224,43 @@ - getSSOData should call /ssodata from the ULP [\#733](https://github.com/auth0/auth0.js/pull/733) ([luisrudge](https://github.com/luisrudge))

## [v9.4.2](https://github.com/auth0/auth0.js/tree/v9.4.2) (2018-03-28)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.4.1...v9.4.2)
**Added**
- Add jwksURI override option [\#717](https://github.com/auth0/auth0.js/pull/717) ([luisrudge](https://github.com/luisrudge))
## [v9.4.1](https://github.com/auth0/auth0.js/tree/v9.4.1) (2018-03-22)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.4.0...v9.4.1)
**Fixed**
- Don't validate access_token when there is no payload.at_hash claim [\#718](https://github.com/auth0/auth0.js/pull/718) ([luisrudge](https://github.com/luisrudge))
## [v9.4.0](https://github.com/auth0/auth0.js/tree/v9.4.0) (2018-03-22)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.3.4...v9.4.0)
**Added**
- Adding access_token validation for RS256 id_token's [\#709](https://github.com/auth0/auth0.js/pull/709) ([luisrudge](https://github.com/luisrudge))
## [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))
- 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)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.3.2...v9.3.3)
**Added**
- Add __enableImpersonation flag to enable impersonation again [\#689](https://github.com/auth0/auth0.js/pull/689) ([luisrudge](https://github.com/luisrudge))
- Add \_\_enableImpersonation flag to enable impersonation again [\#689](https://github.com/auth0/auth0.js/pull/689) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- Use CookieStorage when accessing localStorage throws an error [\#698](https://github.com/auth0/auth0.js/pull/698) ([luisrudge](https://github.com/luisrudge))

@@ -203,14 +271,19 @@ - Remove `email` param in cross auth login [\#692](https://github.com/auth0/auth0.js/pull/692) ([luisrudge](https://github.com/luisrudge))

## [v9.3.2](https://github.com/auth0/auth0.js/tree/v9.3.2) (2018-03-02)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.3.1...v9.3.2)
**Fixed**
- Adding legacy error handling for co/auth endpoint [\#685](https://github.com/auth0/auth0.js/pull/685) ([luisrudge](https://github.com/luisrudge))
## [v9.3.1](https://github.com/auth0/auth0.js/tree/v9.3.1) (2018-02-28)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.3.0...v9.3.1)
## [v9.3.0](https://github.com/auth0/auth0.js/tree/v9.3.0) (2018-02-22)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.3...v9.3.0)
**Fixed**
- Fix CSRF vulnerability when `hash.state` is empty. Please read more about it [here](https://github.com/auth0/auth0.js/blob/master/SECURITY-NOTICE.md) and [here](https://auth0.com/docs/security/bulletins/cve-2018-7307). [\#673](https://github.com/auth0/auth0.js/pull/673) ([luisrudge](https://github.com/luisrudge))

@@ -222,56 +295,75 @@ - Use WinChan on popup.callback again + adding origin check to keep it secure [\#669](https://github.com/auth0/auth0.js/pull/669) ([luisrudge](https://github.com/luisrudge))

## [v9.2.3](https://github.com/auth0/auth0.js/tree/v9.2.3) (2018-02-14)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.2...v9.2.3)
**Changed**
- Use webAuth.login when calling signupAndLogin to support Universal Login Page [\#664](https://github.com/auth0/auth0.js/pull/664) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- Fix federated param [\#661](https://github.com/auth0/auth0.js/pull/661) ([luisrudge](https://github.com/luisrudge))
## [v9.2.2](https://github.com/auth0/auth0.js/tree/v9.2.2) (2018-02-08)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.1...v9.2.2)
**Fixed**
- Making Authentication constructor accept one or two params [\#657](https://github.com/auth0/auth0.js/pull/657) ([luisrudge](https://github.com/luisrudge))
## [v9.2.1](https://github.com/auth0/auth0.js/tree/v9.2.1) (2018-02-05)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.0...v9.2.1)
**Fixed**
- Remove origin check from checkSession when redirectUri is empty [\#653](https://github.com/auth0/auth0.js/pull/653) ([luisrudge](https://github.com/luisrudge))
## [v9.2.0](https://github.com/auth0/auth0.js/tree/v9.2.0) (2018-02-01)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.1.3...v9.2.0)
**Added**
- Normalized login and passwordlessLogin usage to make it work in embedded and hosted scenarios [\#646](https://github.com/auth0/auth0.js/pull/646) ([luisrudge](https://github.com/luisrudge))
## [v9.1.3](https://github.com/auth0/auth0.js/tree/v9.1.3) (2018-01-29)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.1.2...v9.1.3)
**Fixed**
- Use origin.port when available [\#641](https://github.com/auth0/auth0.js/pull/641) ([luisrudge](https://github.com/luisrudge))
## [v9.1.2](https://github.com/auth0/auth0.js/tree/v9.1.2) (2018-01-26)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.1.1...v9.1.2)
**Fixed**
- Fixing ie/edge `window.location.origin` issue [\#638](https://github.com/auth0/auth0.js/pull/638) ([luisrudge](https://github.com/luisrudge))
## [v9.1.1](https://github.com/auth0/auth0.js/tree/v9.1.1) (2018-01-24)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.1.0...v9.1.1)
**Fixed**
- Fix undefined origin in popup mode [\#635](https://github.com/auth0/auth0.js/pull/635) ([luisrudge](https://github.com/luisrudge))
## [v9.1.0](https://github.com/auth0/auth0.js/tree/v9.1.0) (2018-01-16)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.0.3...v9.1.0)
**Changed**
- Validate current window origin and redirecturi origin to prevent mismatches [\#615](https://github.com/auth0/auth0.js/pull/615) ([luisrudge](https://github.com/luisrudge))
## [v9.0.3](https://github.com/auth0/auth0.js/tree/v9.0.3) (2018-01-15)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.0.2...v9.0.3)
**Fixed**
- Use window.location.origin instead of window.origin [\#627](https://github.com/auth0/auth0.js/pull/627) ([thoean](https://github.com/thoean))

@@ -281,14 +373,19 @@ - Do not consider a load event valid if protocol is "about:" [\#619](https://github.com/auth0/auth0.js/pull/619) ([damien-gl](https://github.com/damien-gl))

## [v9.0.2](https://github.com/auth0/auth0.js/tree/v9.0.2) (2017-12-29)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.0.1...v9.0.2)
**Fixed**
- Blacklisting invalid params in authorize url [\#611](https://github.com/auth0/auth0.js/pull/611) ([luisrudge](https://github.com/luisrudge))
## [v9.0.1](https://github.com/auth0/auth0.js/tree/v9.0.1) (2017-12-26)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.0.0...v9.0.1)
**Changed**
- setting getSSOData timeout to 5s [\#602](https://github.com/auth0/auth0.js/pull/602) ([luisrudge](https://github.com/luisrudge))
## [v9.0.0](https://github.com/auth0/auth0.js/tree/v9.0.0) (2017-12-21)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.0.0-beta.9...v8.10.1)

@@ -315,16 +412,20 @@

## [v8.10.1](https://github.com/auth0/auth0.js/tree/v8.10.1) (2017-09-19)
## [v8.10.1](https://github.com/auth0/auth0.js/tree/v8.10.1) (2017-09-19)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.10.0...v8.10.1)
**Changed**
- Removing renewSession and keeping only checkSession [\#505](https://github.com/auth0/auth0.js/pull/505) ([luisrudge](https://github.com/luisrudge))
## [v8.10.0](https://github.com/auth0/auth0.js/tree/v8.10.0) (2017-09-18)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.9.3...v8.10.0)
**Added**
- Adding web_message flow [\#500](https://github.com/auth0/auth0.js/pull/500) ([luisrudge](https://github.com/luisrudge))
**Fixed**
- Fixing tenant override in popup mode [\#501](https://github.com/auth0/auth0.js/pull/501) ([luisrudge](https://github.com/luisrudge))

@@ -334,23 +435,31 @@ - Allow overriding the timeout as part of the renewAuth method [\#497](https://github.com/auth0/auth0.js/pull/497) ([dctoon](https://github.com/dctoon))

## [v8.9.3](https://github.com/auth0/auth0.js/tree/v8.9.3) (2017-08-21)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.9.2...v8.9.3)
**Fixed**
- Using transaction manager on passwordlessStart [\#492](https://github.com/auth0/auth0.js/pull/492) ([luisrudge](https://github.com/luisrudge))
## [v8.9.2](https://github.com/auth0/auth0.js/tree/v8.9.2) (2017-08-17)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.9.1...v8.9.2)
**Fixed**
- Fix passwordlessVerify not sending nonce [\#489](https://github.com/auth0/auth0.js/pull/489) ([luisrudge](https://github.com/luisrudge))
## [v8.9.1](https://github.com/auth0/auth0.js/tree/v8.9.1) (2017-08-11)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.9.0...v8.9.1)
**Fixed**
- Fixed credentialType url [\#487](https://github.com/auth0/auth0.js/pull/487) ([luisrudge](https://github.com/luisrudge))
## [v8.9.0](https://github.com/auth0/auth0.js/tree/v8.9.0) (2017-08-10)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.8.0...v8.9.0)
**Added**
- Add flag to retry requests [\#484](https://github.com/auth0/auth0.js/pull/484) ([luisrudge](https://github.com/luisrudge))

@@ -360,26 +469,34 @@ - Add cross-origin-auth support to Passwordless [\#482](https://github.com/auth0/auth0.js/pull/482) ([luisrudge](https://github.com/luisrudge))

**Changed**
- Avoid snake casing of metadata on signup [\#475](https://github.com/auth0/auth0.js/pull/475) ([hzalaz](https://github.com/hzalaz))
**Fixed**
- Send empty verifier when can't access sessionStorage [\#470](https://github.com/auth0/auth0.js/pull/470) ([luisrudge](https://github.com/luisrudge))
## [v8.8.0](https://github.com/auth0/auth0.js/tree/v8.8.0) (2017-06-20)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.7.0...v8.8.0)
**Changed**
- Update idtoken-verifier [\#458](https://github.com/auth0/auth0.js/pull/458) ([hzalaz](https://github.com/hzalaz))
**Fixed**
- Fix passwordless inside hosted login page [\#459](https://github.com/auth0/auth0.js/pull/459) ([hzalaz](https://github.com/hzalaz))
## [v8.7.0](https://github.com/auth0/auth0.js/tree/v8.7.0) (2017-05-24)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.6.1...v8.7.0)
**Added**
- Adding `scope` to the parsed hash object [\#434](https://github.com/auth0/auth0.js/pull/434) ([luisrudge](https://github.com/luisrudge))
- Add option to filter iframe events to prevent incorrect events triggering callbacks [\#432](https://github.com/auth0/auth0.js/pull/432) ([aaronchilcott](https://github.com/aaronchilcott))
- Adding cross-origin-auth sessionless flow [\#431](https://github.com/auth0/auth0.js/pull/431) ([luisrudge](https://github.com/luisrudge))
- Adding new LoginTicket flow (with session) [\#426](https://github.com/auth0/auth0.js/pull/426) ([hzalaz](https://github.com/hzalaz))
- Adding new LoginTicket flow (with session) [\#426](https://github.com/auth0/auth0.js/pull/426) ([hzalaz](https://github.com/hzalaz))
**Changed**
- Sending all /co/authenticate errors to the error callback [\#443](https://github.com/auth0/auth0.js/pull/443) ([luisrudge](https://github.com/luisrudge))

@@ -389,2 +506,3 @@ - Fix some examples and docs + using https everywhere [\#436](https://github.com/auth0/auth0.js/pull/436) ([luisrudge](https://github.com/luisrudge))

**Fixed**
- Add login_ticket to params whitelist [\#442](https://github.com/auth0/auth0.js/pull/442) ([luisrudge](https://github.com/luisrudge))

@@ -395,30 +513,36 @@ - Fix decoding base64 string with special characters [\#440](https://github.com/auth0/auth0.js/pull/440) ([luisrudge](https://github.com/luisrudge))

## [v8.6.1](https://github.com/auth0/auth0.js/tree/v8.6.1) (2017-05-08)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.6.0...v8.6.1)
**Fixed**
- Fix postMessage handler to handle parsed objects as well [\#420](https://github.com/auth0/auth0.js/pull/420) ([luisrudge](https://github.com/luisrudge))
## [v8.6.0](https://github.com/auth0/auth0.js/tree/v8.6.0) (2017-04-24)
## [v8.6.0](https://github.com/auth0/auth0.js/tree/v8.6.0) (2017-04-24)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.5.0...v8.6.0)
**Fixed**
- Fixed `nonce` checking on `renewAuth` method [\#413](https://github.com/auth0/auth0.js/pull/413) ([luisrudge](https://github.com/luisrudge))
- Fixed 'qs' dependency [\#401](https://github.com/auth0/auth0.js/pull/401) ([maxpaj](https://github.com/maxpaj))
## [v8.5.0](https://github.com/auth0/auth0.js/tree/v8.5.0) (2017-03-27)
## [v8.5.0](https://github.com/auth0/auth0.js/tree/v8.5.0) (2017-03-27)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.4.0...v8.5.0)
**Changed**
- Improve jsdocs [\#393](https://github.com/auth0/auth0.js/pull/393) ([hzalaz](https://github.com/hzalaz))
**Fixed**
- Fixing error handling for when the error comes as a successful response from WinChan [\#395](https://github.com/auth0/auth0.js/pull/395) ([luisrudge](https://github.com/luisrudge))
- Correct spelling mistake in web-auth JSDoc resulting in incorrect autocomplete suggestions [\#388](https://github.com/auth0/auth0.js/pull/388) ([Geeman201](https://github.com/Geeman201))
## [v8.4.0](https://github.com/auth0/auth0.js/tree/v8.4.0) (2017-03-13)
## [v8.4.0](https://github.com/auth0/auth0.js/tree/v8.4.0) (2017-03-13)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.3.0...v8.4.0)
**Closed issues**
- winchanOptions missing parameters [\#378](https://github.com/auth0/auth0.js/issues/378)

@@ -428,5 +552,7 @@ - 'Nonce does not match' error when state data contains '=' encoded as %3D [\#377](https://github.com/auth0/auth0.js/issues/377)

**Added**
- Added possibility to specify custom popup size [\#379](https://github.com/auth0/auth0.js/pull/379) ([artemtool](https://github.com/artemtool))
**Changed**
- Whitelist resource owner parameters [\#386](https://github.com/auth0/auth0.js/pull/386) ([hzalaz](https://github.com/hzalaz))

@@ -439,11 +565,13 @@ - Only allow to be used in node 6.9 or later [\#385](https://github.com/auth0/auth0.js/pull/385) ([hzalaz](https://github.com/hzalaz))

**Fixed**
- Pass to popup the needed params for auth [\#381](https://github.com/auth0/auth0.js/pull/381) ([hzalaz](https://github.com/hzalaz))
## [v8.3.0](https://github.com/auth0/auth0.js/tree/v8.3.0) (2017-03-01)
## [v8.3.0](https://github.com/auth0/auth0.js/tree/v8.3.0) (2017-03-01)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.2.0...v8.3.0)
**Added**
- Integration tests [\#346](https://github.com/auth0/auth0.js/pull/346) ([glena](https://github.com/glena))
- Whitelist nonce, state, _csrf and _instate from constructor [\#345](https://github.com/auth0/auth0.js/pull/345) ([glena](https://github.com/glena))
- Whitelist nonce, state, \_csrf and \_instate from constructor [\#345](https://github.com/auth0/auth0.js/pull/345) ([glena](https://github.com/glena))
- Added flag to disable id_token verification for legacy Auth0 Applications [\#341](https://github.com/auth0/auth0.js/pull/341) ([glena](https://github.com/glena))

@@ -453,2 +581,3 @@ - Popup no owp [\#337](https://github.com/auth0/auth0.js/pull/337) ([glena](https://github.com/glena))

**Changed**
- Remove warnings around refreshing session [\#353](https://github.com/auth0/auth0.js/pull/353) ([hzalaz](https://github.com/hzalaz))

@@ -458,49 +587,59 @@ - Updated passwordless start jsdocs [\#340](https://github.com/auth0/auth0.js/pull/340) ([glena](https://github.com/glena))

**Fixed**
- Only parse cordova callback hash [\#370](https://github.com/auth0/auth0.js/pull/370) ([hzalaz](https://github.com/hzalaz))
- Only parse cordova callback hash [\#370](https://github.com/auth0/auth0.js/pull/370) ([hzalaz](https://github.com/hzalaz))
## [v8.2.0](https://github.com/auth0/auth0.js/tree/v8.2.0) (2017-01-30)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.3...v8.2.0)
**Added**
- Plugins support + cordova plugin [\#333](https://github.com/auth0/auth0.js/pull/333) ([glena](https://github.com/glena))
**Fixed**
- popup.authorize should not require redirectURI when using OWP [\#336](https://github.com/auth0/auth0.js/pull/336) ([glena](https://github.com/glena))
## [v8.1.3](https://github.com/auth0/auth0.js/tree/v8.1.3) (2017-01-23)
## [v8.1.3](https://github.com/auth0/auth0.js/tree/v8.1.3) (2017-01-23)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.2...v8.1.3)
**Fixed**
- Fix case convertion of null values [\#329](https://github.com/auth0/auth0.js/pull/329) ([glena](https://github.com/glena))
## [v8.1.2](https://github.com/auth0/auth0.js/tree/v8.1.2) (2017-01-19)
## [v8.1.2](https://github.com/auth0/auth0.js/tree/v8.1.2) (2017-01-19)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.1...v8.1.2)
**Fixed**
- Fixed params whitelist for authorize endpoint [\#324](https://github.com/auth0/auth0.js/pull/324) ([glena](https://github.com/glena))
## [v8.1.1](https://github.com/auth0/auth0.js/tree/v8.1.1) (2017-01-17)
## [v8.1.1](https://github.com/auth0/auth0.js/tree/v8.1.1) (2017-01-17)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.1.0...v8.1.1)
**Changed**
- Removed state requirement [\#321](https://github.com/auth0/auth0.js/pull/321) ([glena](https://github.com/glena))
**Removed**
- Revert "Fallback to math.random if there is no crypto support" [\#320](https://github.com/auth0/auth0.js/pull/320) ([glena](https://github.com/glena))
**Fixed**
- Fix undefined variable [\#319](https://github.com/auth0/auth0.js/pull/319) ([glena](https://github.com/glena))
## [v8.1.0](https://github.com/auth0/auth0.js/tree/v8.1.0) (2017-01-17)
## [v8.1.0](https://github.com/auth0/auth0.js/tree/v8.1.0) (2017-01-17)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.4...v8.1.0)
**Added**
- Fallback to math.random if there is no crypto support [\#316](https://github.com/auth0/auth0.js/pull/316) ([glena](https://github.com/glena))
**Fixed**
- Fix passwordless [\#315](https://github.com/auth0/auth0.js/pull/315) ([glena](https://github.com/glena))

@@ -511,34 +650,39 @@ - Passwordless start: map params to authParams and fix tests [\#306](https://github.com/auth0/auth0.js/pull/306) ([glena](https://github.com/glena))

**Breaking changes**
- Do not change casing of the user profile object [\#307](https://github.com/auth0/auth0.js/pull/307) ([glena](https://github.com/glena))
## [v8.0.4](https://github.com/auth0/auth0.js/tree/v8.0.4) (2017-01-06)
## [v8.0.4](https://github.com/auth0/auth0.js/tree/v8.0.4) (2017-01-06)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.3...v8.0.4)
**Fixed**
- Fix undefined valud in for [\#295](https://github.com/auth0/auth0.js/pull/295) ([glena](https://github.com/glena))
## [v8.0.3](https://github.com/auth0/auth0.js/tree/v8.0.3) (2017-01-06)
## [v8.0.3](https://github.com/auth0/auth0.js/tree/v8.0.3) (2017-01-06)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.2...v8.0.3)
**Added**
- Add the option to provide a leeway [\#292](https://github.com/auth0/auth0.js/pull/292) ([glena](https://github.com/glena))
## [v8.0.2](https://github.com/auth0/auth0.js/tree/v8.0.2) (2017-01-05)
## [v8.0.2](https://github.com/auth0/auth0.js/tree/v8.0.2) (2017-01-05)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.1...v8.0.2)
**Fixed**
- Polyfill functions [\#285](https://github.com/auth0/auth0.js/pull/285) ([glena](https://github.com/glena))
## [v8.0.1](https://github.com/auth0/auth0.js/tree/v8.0.1) (2017-01-04)
## [v8.0.1](https://github.com/auth0/auth0.js/tree/v8.0.1) (2017-01-04)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.0...v8.0.1)
**Fixed**
- Fix getSSOData failing due to extra headers [\#284](https://github.com/auth0/auth0.js/pull/284) ([glena](https://github.com/glena))
## [v8.0.0](https://github.com/auth0/auth0.js/tree/v8.0.0) (2017-01-03)
## [v8.0.0](https://github.com/auth0/auth0.js/tree/v8.0.0) (2017-01-03)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.0-beta.3...v8.0.0)

@@ -556,4 +700,4 @@

var auth0 = new auth0.WebAuth({
domain: "{YOUR_AUTH0_DOMAIN}",
clientID: "{YOUR_AUTH0_CLIENT_ID}"
domain: '{YOUR_AUTH0_DOMAIN}',
clientID: '{YOUR_AUTH0_CLIENT_ID}'
});

@@ -568,7 +712,8 @@ ```

auth0.client.userInfo(accessToken, function(error, userInfo) {
// User information or error
});
// User information or error
});
```
**Added**
- add token validation and signature verification to the parseHash method [\#278](https://github.com/auth0/auth0.js/pull/278) ([glena](https://github.com/glena))

@@ -578,25 +723,31 @@ - Add method to signup and login using password-realm [\#277](https://github.com/auth0/auth0.js/pull/277) ([glena](https://github.com/glena))

**Breaking changes**
- Rename methods based on authN and authZ type [\#280](https://github.com/auth0/auth0.js/pull/280) ([glena](https://github.com/glena))
## [v8.0.0-beta.3](https://github.com/auth0/auth0.js/tree/v8.0.0-beta.3) (2016-12-19)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.0-beta.3...v8.0.0-beta.3)
**Fixed**
- special handling for popup error responses [\#276](https://github.com/auth0/auth0.js/pull/276) ([glena](https://github.com/glena))
## [v8.0.0-beta.2](https://github.com/auth0/auth0.js/tree/v8.0.0-beta.2) (2016-12-16)
## [v8.0.0-beta.2](https://github.com/auth0/auth0.js/tree/v8.0.0-beta.2) (2016-12-16)
[Full Changelog](https://github.com/auth0/auth0.js/compare/v8.0.0-beta.2...v8.0.0-beta.2)
**Added**
- Cookie fallback for storage [\#270](https://github.com/auth0/auth0.js/pull/270) ([glena](https://github.com/glena))
**Fixed**
- Return policy attr in errors + responseType validation [\#273](https://github.com/auth0/auth0.js/pull/273) ([glena](https://github.com/glena))
## [v8.0.0-beta.1](https://github.com/auth0/lock/tree/v8.0.0-beta.1) (2016-12-14)
## [v8.0.0-beta.1](https://github.com/auth0/lock/tree/v8.0.0-beta.1) (2016-12-14)
[Full Changelog](https://github.com/auth0/lock/tree/v8.0.0-alpha.2...v8.0.0-beta.1)
**Added**
- Add get user country method for passwordless [\#267](https://github.com/auth0/auth0.js/pull/267) ([glena](https://github.com/glena))

@@ -606,12 +757,16 @@ - Login with password realm grant via /oauth/token [\#265](https://github.com/auth0/auth0.js/pull/265) ([glena](https://github.com/glena))

**Changed**
- Add standard fields to parseHash and normalize responses to camelCase [\#261](https://github.com/auth0/auth0.js/pull/261) ([glena](https://github.com/glena))
- Add Whitelist of authorize parameters [\#258](https://github.com/auth0/auth0.js/pull/258) ([glena](https://github.com/glena))
- Add Whitelist of authorize parameters [\#258](https://github.com/auth0/auth0.js/pull/258) ([glena](https://github.com/glena))
**Fixed**
- Send cookies on CORS call [\#259](https://github.com/auth0/auth0.js/pull/259) ([glena](https://github.com/glena))
## [v8.0.0-alpha.2](https://github.com/auth0/lock/tree/v8.0.0-alpha.2) (2016-12-05)
[Full Changelog](https://github.com/auth0/lock/tree/v8.0.0-alpha.1...v8.0.0-alpha.2)
**Closed issues**
- redirectUri should not be mandatory in the constructor [\#249](https://github.com/auth0/auth0.js/issues/249)

@@ -622,3 +777,4 @@ - responseMode should be part of the constructor params [\#247](https://github.com/auth0/auth0.js/issues/247)

**Added**
- Preload window for popup signup and login [\#256](https://github.com/auth0/auth0.js/pull/256) ([glena](https://github.com/glena))
- Preload window for popup signup and login [\#256](https://github.com/auth0/auth0.js/pull/256) ([glena](https://github.com/glena))
- Quirks mode and deprecations warning [\#255](https://github.com/auth0/auth0.js/pull/255) ([glena](https://github.com/glena))

@@ -631,8 +787,11 @@ - Added responseMode, all methods uses the same params from construct, redirectUri is not mandatory [\#253](https://github.com/auth0/auth0.js/pull/253) ([glena](https://github.com/glena))

**Changed**
- Fix nonce mismatch check [\#254](https://github.com/auth0/auth0.js/pull/254) ([glena](https://github.com/glena))
## [v8.0.0-alpha.1](https://github.com/auth0/lock/tree/v8.0.0-alpha.1) (2016-11-21)
[Full Changelog](https://github.com/auth0/lock/tree/v8.0.0-alpha.1)
**Added**
- Change webauth structure + Allow to abort requests [\#240](https://github.com/auth0/auth0.js/pull/240) ([glena](https://github.com/glena))

@@ -642,2 +801,1 @@ - added extra options + snake to camel all the options [\#236](https://github.com/auth0/auth0.js/pull/236) ([glena](https://github.com/glena))

- Webauth redirect login/callback [\#231](https://github.com/auth0/auth0.js/pull/231) ([glena](https://github.com/glena))
/**
* auth0-js v9.11.2
* auth0-js v9.11.3
* Author: Auth0
* Date: 2019-07-15
* Date: 2019-08-05
* License: MIT

@@ -11,6 +11,6 @@ */

typeof define === 'function' && define.amd ? define(factory) :
(global.CordovaAuth0Plugin = factory());
}(this, (function () { 'use strict';
(global = global || self, global.CordovaAuth0Plugin = factory());
}(this, function () { 'use strict';
var version = { raw: '9.11.2' };
var version = { raw: '9.11.3' };

@@ -110,3 +110,7 @@ var toString = Object.prototype.toString;

var keysArray = Object.keys(Object(nextSource));
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
for (
var nextIndex = 0, len = keysArray.length;
nextIndex < len;
nextIndex++
) {
var nextKey = keysArray[nextIndex];

@@ -343,4 +347,3 @@ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);

(function (name, context, definition) {
if (module.exports) module.exports = definition();
else if (typeof undefined === 'function' && undefined.amd) undefined(definition);
if ( module.exports) module.exports = definition();
else context[name] = definition();

@@ -351,3 +354,8 @@ })('urljoin', commonjsGlobal, function () {

var resultArray = [];
if (strArray.length === 0) { return ''; }
if (typeof strArray[0] !== 'string') {
throw new TypeError('Url must be a string. Received ' + strArray[0]);
}
// If the first part is a plain protocol, we combine it with the next part.

@@ -1252,4 +1260,10 @@ if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) {

PopupHandler.prototype.unhook = function() {
this._current_popup.removeEventListener('loaderror', this.transientErrorHandler);
this._current_popup.removeEventListener('loadstart', this.transientStartHandler);
this._current_popup.removeEventListener(
'loaderror',
this.transientErrorHandler
);
this._current_popup.removeEventListener(
'loadstart',
this.transientStartHandler
);
this._current_popup.removeEventListener('exit', this.transientExitHandler);

@@ -1280,3 +1294,7 @@ };

var callbackUrl = urlJoin('https:', this.webAuth.baseOptions.domain, '/mobile');
var callbackUrl = urlJoin(
'https:',
this.webAuth.baseOptions.domain,
'/mobile'
);

@@ -1311,3 +1329,3 @@ if (event.url && !(event.url.indexOf(callbackUrl + '#') === 0)) {

PluginHandler.prototype.processParams = function (params) {
PluginHandler.prototype.processParams = function(params) {
params.redirectUri = urlJoin('https://' + params.domain, 'mobile');

@@ -1318,3 +1336,3 @@ delete params.owp;

PluginHandler.prototype.getPopupHandler = function () {
PluginHandler.prototype.getPopupHandler = function() {
return new PopupHandler(this.webAuth);

@@ -1347,2 +1365,2 @@ };

})));
}));
/**
* auth0-js v9.11.2
* auth0-js v9.11.3
* Author: Auth0
* Date: 2019-07-15
* Date: 2019-08-05
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.CordovaAuth0Plugin=factory()}(this,function(){"use strict";var version={raw:"9.11.2"},toString=Object.prototype.toString;function attribute(o,attr,type,text){if(type="array"===type?"object":type,o&&typeof o[attr]!==type)throw new Error(text)}function variable(o,type,text){if(typeof o!==type)throw new Error(text)}function value(o,values,text){if(-1===values.indexOf(o))throw new Error(text)}var assert={check:function(o,config,attributes){if(config.optional&&!o||variable(o,config.type,config.message),"object"===config.type&&attributes)for(var keys=Object.keys(attributes),index=0;index<keys.length;index++){var a=keys[index];attributes[a].optional&&!o[a]||attributes[a].condition&&!attributes[a].condition(o)||(attribute(o,a,attributes[a].type,attributes[a].message),attributes[a].values&&value(o[a],attributes[a].values,attributes[a].value_message))}},attribute:attribute,variable:variable,value:value,isArray:function(array){return this.supportsIsArray()?Array.isArray(array):"[object Array]"===toString.call(array)},supportsIsArray:function(){return null!=Array.isArray}};function objectAssignPolyfill(target){if(null==target)throw new TypeError("Cannot convert first argument to object");for(var to=Object(target),i=1;i<arguments.length;i++){var nextSource=arguments[i];if(null!=nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex++){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(to[nextKey]=nextSource[nextKey])}}return to}var objectAssign={get:function(){return Object.assign?Object.assign:objectAssignPolyfill},objectAssignPolyfill:objectAssignPolyfill};function pick(object,keys){return keys.reduce(function(prev,key){return object[key]&&(prev[key]=object[key]),prev},{})}function extend(){var params=function(obj){var values=[];for(var key in obj)values.push(obj[key]);return values}(arguments);return params.unshift({}),objectAssign.get().apply(void 0,params)}function getLocationFromUrl(href){var match=href.match(/^(https?:|file:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return match&&{href:href,protocol:match[1],host:match[2],hostname:match[3],port:match[4],pathname:match[5],search:match[6],hash:match[7]}}function trim(options,key){var trimmed=extend(options);return options[key]&&(trimmed[key]=options[key].trim()),trimmed}var objectHelper={toSnakeCase:function toSnakeCase(object,exceptions){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],Object.keys(object).reduce(function(p,key){return p[-1===exceptions.indexOf(key)?function(str){for(var code,newKey="",index=0,wasPrevNumber=!0,wasPrevUppercase=!0;index<str.length;)code=str.charCodeAt(index),!wasPrevUppercase&&code>=65&&code<=90||!wasPrevNumber&&code>=48&&code<=57?(newKey+="_",newKey+=str[index].toLowerCase()):newKey+=str[index].toLowerCase(),wasPrevNumber=code>=48&&code<=57,wasPrevUppercase=code>=65&&code<=90,index++;return newKey}(key):key]=toSnakeCase(object[key]),p},{}))},toCamelCase:function toCamelCase(object,exceptions,options){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],options=options||{},Object.keys(object).reduce(function(p,key){var parts,newKey=-1===exceptions.indexOf(key)?(parts=key.split("_")).reduce(function(p,c){return p+c.charAt(0).toUpperCase()+c.slice(1)},parts.shift()):key;return p[newKey]=toCamelCase(object[newKey]||object[key],[],options),options.keepOriginal&&(p[key]=toCamelCase(object[key],[],options)),p},{}))},blacklist:function(object,blacklistedKeys){return Object.keys(object).reduce(function(p,key){return-1===blacklistedKeys.indexOf(key)&&(p[key]=object[key]),p},{})},merge:function(object,keys){return{base:keys?pick(object,keys):object,with:function(object2,keys2){return object2=keys2?pick(object2,keys2):object2,extend(this.base,object2)}}},pick:pick,getKeysNotIn:function(obj,allowedKeys){var notAllowed=[];for(var key in obj)-1===allowedKeys.indexOf(key)&&notAllowed.push(key);return notAllowed},extend:extend,getOriginFromUrl:function(url){if(url){var parsed=getLocationFromUrl(url),origin=parsed.protocol+"//"+parsed.hostname;return parsed.port&&(origin+=":"+parsed.port),origin}},getLocationFromUrl:getLocationFromUrl,trimUserDetails:function(options){return function(options,keys){return keys.reduce(trim,options)}(options,["username","email","phoneNumber"])}};function getWindow(){return window}var windowHandler={redirect:function(url){getWindow().location=url},getDocument:function(){return getWindow().document},getWindow:getWindow,getOrigin:function(){var location=getWindow().location,origin=location.origin;return origin||(origin=objectHelper.getOriginFromUrl(location.href)),origin}},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var module,urlJoin=(function(module){var context,definition;context=commonjsGlobal,definition=function(){return function(){return function(strArray){var resultArray=[];if(strArray[0].match(/^[^\/:]+:\/*$/)&&strArray.length>1){var first=strArray.shift();strArray[0]=first+strArray[0]}strArray[0].match(/^file:\/\/\//)?strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1:///"):strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1://");for(var i=0;i<strArray.length;i++){var component=strArray[i];if("string"!=typeof component)throw new TypeError("Url must be a string. Received "+component);""!==component&&(i>0&&(component=component.replace(/^[\/]+/,"")),component=i<strArray.length-1?component.replace(/[\/]+$/,""):component.replace(/[\/]+$/,"/"),resultArray.push(component))}var str=resultArray.join("/"),parts=(str=str.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return str=parts.shift()+(parts.length>0?"?":"")+parts.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},module.exports?module.exports=definition():context.urljoin=definition()}(module={exports:{}},module.exports),module.exports),has=Object.prototype.hasOwnProperty,isArray$1=Array.isArray,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}(),arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i<source.length;++i)void 0!==source[i]&&(obj[i]=source[i]);return obj},utils={arrayToObject:arrayToObject,assign:function(target,source){return Object.keys(source).reduce(function(acc,key){return acc[key]=source[key],acc},target)},combine:function(a,b){return[].concat(a,b)},compact:function(value){for(var queue=[{obj:{o:value},prop:"o"}],refs=[],i=0;i<queue.length;++i)for(var item=queue[i],obj=item.obj[item.prop],keys=Object.keys(obj),j=0;j<keys.length;++j){var key=keys[j],val=obj[key];"object"==typeof val&&null!==val&&-1===refs.indexOf(val)&&(queue.push({obj:obj,prop:key}),refs.push(val))}return function(queue){for(;queue.length>1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray$1(obj)){for(var compacted=[],j=0;j<obj.length;++j)void 0!==obj[j]&&compacted.push(obj[j]);item.obj[item.prop]=compacted}}}(queue),value},decode:function(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if("iso-8859-1"===charset)return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(strWithoutPlus)}catch(e){return strWithoutPlus}},encode:function(str,defaultEncoder,charset){if(0===str.length)return str;var string="string"==typeof str?str:String(str);if("iso-8859-1"===charset)return escape(string).replace(/%u[0-9a-f]{4}/gi,function($0){return"%26%23"+parseInt($0.slice(2),16)+"%3B"});for(var out="",i=0;i<string.length;++i){var c=string.charCodeAt(i);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},isBuffer:function(obj){return!(!obj||"object"!=typeof obj||!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))},isRegExp:function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},merge:function merge(target,source,options){if(!source)return target;if("object"!=typeof source){if(isArray$1(target))target.push(source);else{if(!target||"object"!=typeof target)return[target,source];(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source))&&(target[source]=!0)}return target}if(!target||"object"!=typeof target)return[target].concat(source);var mergeTarget=target;return isArray$1(target)&&!isArray$1(source)&&(mergeTarget=arrayToObject(target,options)),isArray$1(target)&&isArray$1(source)?(source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];targetItem&&"object"==typeof targetItem&&item&&"object"==typeof item?target[i]=merge(targetItem,item,options):target.push(item)}else target[i]=item}),target):Object.keys(source).reduce(function(acc,key){var value=source[key];return has.call(acc,key)?acc[key]=merge(acc[key],value,options):acc[key]=value,acc},mergeTarget)}},replace=String.prototype.replace,percentTwenties=/%20/g,formats={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"},has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},comma:"comma",indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},isArray$2=Array.isArray,push=Array.prototype.push,pushToArray=function(arr,valueOrArray){push.apply(arr,isArray$2(valueOrArray)?valueOrArray:[valueOrArray])},toISO=Date.prototype.toISOString,defaults={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils.encode,encodeValuesOnly:!1,formatter:formats.formatters[formats.default],indices:!1,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},stringify=function stringify(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset){var obj=object;if("function"==typeof filter?obj=filter(prefix,obj):obj instanceof Date?obj=serializeDate(obj):"comma"===generateArrayPrefix&&isArray$2(obj)&&(obj=obj.join(",")),null===obj){if(strictNullHandling)return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset):prefix;obj=""}if("string"==typeof obj||"number"==typeof obj||"boolean"==typeof obj||utils.isBuffer(obj))return encoder?[formatter(encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset))+"="+formatter(encoder(obj,defaults.encoder,charset))]:[formatter(prefix)+"="+formatter(String(obj))];var objKeys,values=[];if(void 0===obj)return values;if(isArray$2(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(isArray$2(obj)?pushToArray(values,stringify(obj[key],"function"==typeof generateArrayPrefix?generateArrayPrefix(prefix,key):prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)):pushToArray(values,stringify(obj[key],prefix+(allowDots?"."+key:"["+key+"]"),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)))}return values},lib_stringify=(Object.prototype.hasOwnProperty,function(object,opts){var objKeys,obj=object,options=function(opts){if(!opts)return defaults;if(null!==opts.encoder&&void 0!==opts.encoder&&"function"!=typeof opts.encoder)throw new TypeError("Encoder has to be a function.");var charset=opts.charset||defaults.charset;if(void 0!==opts.charset&&"utf-8"!==opts.charset&&"iso-8859-1"!==opts.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var format=formats.default;if(void 0!==opts.format){if(!has$1.call(formats.formatters,opts.format))throw new TypeError("Unknown format option provided.");format=opts.format}var formatter=formats.formatters[format],filter=defaults.filter;return("function"==typeof opts.filter||isArray$2(opts.filter))&&(filter=opts.filter),{addQueryPrefix:"boolean"==typeof opts.addQueryPrefix?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:void 0===opts.allowDots?defaults.allowDots:!!opts.allowDots,charset:charset,charsetSentinel:"boolean"==typeof opts.charsetSentinel?opts.charsetSentinel:defaults.charsetSentinel,delimiter:void 0===opts.delimiter?defaults.delimiter:opts.delimiter,encode:"boolean"==typeof opts.encode?opts.encode:defaults.encode,encoder:"function"==typeof opts.encoder?opts.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof opts.encodeValuesOnly?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,formatter:formatter,serializeDate:"function"==typeof opts.serializeDate?opts.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof opts.skipNulls?opts.skipNulls:defaults.skipNulls,sort:"function"==typeof opts.sort?opts.sort:null,strictNullHandling:"boolean"==typeof opts.strictNullHandling?opts.strictNullHandling:defaults.strictNullHandling}}(opts);"function"==typeof options.filter?obj=(0,options.filter)("",obj):isArray$2(options.filter)&&(objKeys=options.filter);var arrayFormat,keys=[];if("object"!=typeof obj||null===obj)return"";arrayFormat=opts&&opts.arrayFormat in arrayPrefixGenerators?opts.arrayFormat:opts&&"indices"in opts?opts.indices?"indices":"repeat":"indices";var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];objKeys||(objKeys=Object.keys(obj)),options.sort&&objKeys.sort(options.sort);for(var i=0;i<objKeys.length;++i){var key=objKeys[i];options.skipNulls&&null===obj[key]||pushToArray(keys,stringify(obj[key],key,generateArrayPrefix,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.formatter,options.encodeValuesOnly,options.charset))}var joined=keys.join(options.delimiter),prefix=!0===options.addQueryPrefix?"?":"";return options.charsetSentinel&&("iso-8859-1"===options.charset?prefix+="utf8=%26%2310003%3B&":prefix+="utf8=%E2%9C%93&"),joined.length>0?prefix+joined:""});function PopupHandler(webAuth){this.webAuth=webAuth,this._current_popup=null,this.options=null}function PluginHandler(webAuth){this.webAuth=webAuth}function CordovaPlugin(){this.webAuth=null,this.version=version.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return PopupHandler.prototype.preload=function(options){var _this=this,_window=windowHandler.getWindow(),url=options.url||"about:blank",popupOptions=options.popupOptions||{};popupOptions.location="yes",delete popupOptions.width,delete popupOptions.height;var windowFeatures=lib_stringify(popupOptions,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=_window.open(url,"_blank",windowFeatures),this._current_popup.kill=function(success){_this._current_popup.success=success,this.close(),_this._current_popup=null},this._current_popup)},PopupHandler.prototype.load=function(url,_,options,cb){var _this=this;this.url=url,this.options=options,this._current_popup?this._current_popup.location.href=url:(options.url=url,this.preload(options)),this.transientErrorHandler=function(event){_this.errorHandler(event,cb)},this.transientStartHandler=function(event){_this.startHandler(event,cb)},this.transientExitHandler=function(){_this.exitHandler(cb)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.errorHandler=function(event,cb){this._current_popup&&(this._current_popup.kill(!0),cb({error:"window_error",errorDescription:event.message}))},PopupHandler.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.exitHandler=function(cb){this._current_popup&&(this.unhook(),this._current_popup.success||cb({error:"window_closed",errorDescription:"Browser window closed"}))},PopupHandler.prototype.startHandler=function(event,cb){var _this=this;if(this._current_popup){var callbackUrl=urlJoin("https:",this.webAuth.baseOptions.domain,"/mobile");if(!event.url||0===event.url.indexOf(callbackUrl+"#")){var parts=event.url.split("#");if(1!==parts.length){var opts={hash:parts.pop()};this.options.nonce&&(opts.nonce=this.options.nonce),this.webAuth.parseHash(opts,function(error,result){(error||result)&&(_this._current_popup.kill(!0),cb(error,result))})}}}},PluginHandler.prototype.processParams=function(params){return params.redirectUri=urlJoin("https://"+params.domain,"mobile"),delete params.owp,params},PluginHandler.prototype.getPopupHandler=function(){return new PopupHandler(this.webAuth)},CordovaPlugin.prototype.setWebAuth=function(webAuth){this.webAuth=webAuth},CordovaPlugin.prototype.supports=function(extensibilityPoint){var _window=windowHandler.getWindow();return(!!_window.cordova||!!_window.electron)&&this.extensibilityPoints.indexOf(extensibilityPoint)>-1},CordovaPlugin.prototype.init=function(){return new PluginHandler(this.webAuth)},CordovaPlugin});
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global=global||self).CordovaAuth0Plugin=factory()}(this,function(){"use strict";var version={raw:"9.11.3"},toString=Object.prototype.toString;function attribute(o,attr,type,text){if(type="array"===type?"object":type,o&&typeof o[attr]!==type)throw new Error(text)}function variable(o,type,text){if(typeof o!==type)throw new Error(text)}function value(o,values,text){if(-1===values.indexOf(o))throw new Error(text)}var assert={check:function(o,config,attributes){if(config.optional&&!o||variable(o,config.type,config.message),"object"===config.type&&attributes)for(var keys=Object.keys(attributes),index=0;index<keys.length;index++){var a=keys[index];attributes[a].optional&&!o[a]||attributes[a].condition&&!attributes[a].condition(o)||(attribute(o,a,attributes[a].type,attributes[a].message),attributes[a].values&&value(o[a],attributes[a].values,attributes[a].value_message))}},attribute:attribute,variable:variable,value:value,isArray:function(array){return this.supportsIsArray()?Array.isArray(array):"[object Array]"===toString.call(array)},supportsIsArray:function(){return null!=Array.isArray}};function objectAssignPolyfill(target){if(null==target)throw new TypeError("Cannot convert first argument to object");for(var to=Object(target),i=1;i<arguments.length;i++){var nextSource=arguments[i];if(null!=nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex++){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(to[nextKey]=nextSource[nextKey])}}return to}var objectAssign={get:function(){return Object.assign?Object.assign:objectAssignPolyfill},objectAssignPolyfill:objectAssignPolyfill};function pick(object,keys){return keys.reduce(function(prev,key){return object[key]&&(prev[key]=object[key]),prev},{})}function extend(){var params=function(obj){var values=[];for(var key in obj)values.push(obj[key]);return values}(arguments);return params.unshift({}),objectAssign.get().apply(void 0,params)}function getLocationFromUrl(href){var match=href.match(/^(https?:|file:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return match&&{href:href,protocol:match[1],host:match[2],hostname:match[3],port:match[4],pathname:match[5],search:match[6],hash:match[7]}}function trim(options,key){var trimmed=extend(options);return options[key]&&(trimmed[key]=options[key].trim()),trimmed}var objectHelper={toSnakeCase:function toSnakeCase(object,exceptions){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],Object.keys(object).reduce(function(p,key){return p[-1===exceptions.indexOf(key)?function(str){for(var code,newKey="",index=0,wasPrevNumber=!0,wasPrevUppercase=!0;index<str.length;)code=str.charCodeAt(index),!wasPrevUppercase&&code>=65&&code<=90||!wasPrevNumber&&code>=48&&code<=57?(newKey+="_",newKey+=str[index].toLowerCase()):newKey+=str[index].toLowerCase(),wasPrevNumber=code>=48&&code<=57,wasPrevUppercase=code>=65&&code<=90,index++;return newKey}(key):key]=toSnakeCase(object[key]),p},{}))},toCamelCase:function toCamelCase(object,exceptions,options){return"object"!=typeof object||assert.isArray(object)||null===object?object:(exceptions=exceptions||[],options=options||{},Object.keys(object).reduce(function(p,key){var parts,newKey=-1===exceptions.indexOf(key)?(parts=key.split("_")).reduce(function(p,c){return p+c.charAt(0).toUpperCase()+c.slice(1)},parts.shift()):key;return p[newKey]=toCamelCase(object[newKey]||object[key],[],options),options.keepOriginal&&(p[key]=toCamelCase(object[key],[],options)),p},{}))},blacklist:function(object,blacklistedKeys){return Object.keys(object).reduce(function(p,key){return-1===blacklistedKeys.indexOf(key)&&(p[key]=object[key]),p},{})},merge:function(object,keys){return{base:keys?pick(object,keys):object,with:function(object2,keys2){return object2=keys2?pick(object2,keys2):object2,extend(this.base,object2)}}},pick:pick,getKeysNotIn:function(obj,allowedKeys){var notAllowed=[];for(var key in obj)-1===allowedKeys.indexOf(key)&&notAllowed.push(key);return notAllowed},extend:extend,getOriginFromUrl:function(url){if(url){var parsed=getLocationFromUrl(url),origin=parsed.protocol+"//"+parsed.hostname;return parsed.port&&(origin+=":"+parsed.port),origin}},getLocationFromUrl:getLocationFromUrl,trimUserDetails:function(options){return function(options,keys){return keys.reduce(trim,options)}(options,["username","email","phoneNumber"])}};function getWindow(){return window}var windowHandler={redirect:function(url){getWindow().location=url},getDocument:function(){return getWindow().document},getWindow:getWindow,getOrigin:function(){var location=getWindow().location,origin=location.origin;return origin||(origin=objectHelper.getOriginFromUrl(location.href)),origin}},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var urlJoin=function(fn,module){return fn(module={exports:{}},module.exports),module.exports}(function(module){var context,definition;context=commonjsGlobal,definition=function(){function normalize(strArray){var resultArray=[];if(0===strArray.length)return"";if("string"!=typeof strArray[0])throw new TypeError("Url must be a string. Received "+strArray[0]);if(strArray[0].match(/^[^\/:]+:\/*$/)&&strArray.length>1){var first=strArray.shift();strArray[0]=first+strArray[0]}strArray[0].match(/^file:\/\/\//)?strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1:///"):strArray[0]=strArray[0].replace(/^([^\/:]+):\/*/,"$1://");for(var i=0;i<strArray.length;i++){var component=strArray[i];if("string"!=typeof component)throw new TypeError("Url must be a string. Received "+component);""!==component&&(i>0&&(component=component.replace(/^[\/]+/,"")),component=i<strArray.length-1?component.replace(/[\/]+$/,""):component.replace(/[\/]+$/,"/"),resultArray.push(component))}var str=resultArray.join("/"),parts=(str=str.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return str=parts.shift()+(parts.length>0?"?":"")+parts.join("&")}return function(){return normalize("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},module.exports?module.exports=definition():context.urljoin=definition()}),has=Object.prototype.hasOwnProperty,isArray$1=Array.isArray,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}(),arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i<source.length;++i)void 0!==source[i]&&(obj[i]=source[i]);return obj},utils={arrayToObject:arrayToObject,assign:function(target,source){return Object.keys(source).reduce(function(acc,key){return acc[key]=source[key],acc},target)},combine:function(a,b){return[].concat(a,b)},compact:function(value){for(var queue=[{obj:{o:value},prop:"o"}],refs=[],i=0;i<queue.length;++i)for(var item=queue[i],obj=item.obj[item.prop],keys=Object.keys(obj),j=0;j<keys.length;++j){var key=keys[j],val=obj[key];"object"==typeof val&&null!==val&&-1===refs.indexOf(val)&&(queue.push({obj:obj,prop:key}),refs.push(val))}return function(queue){for(;queue.length>1;){var item=queue.pop(),obj=item.obj[item.prop];if(isArray$1(obj)){for(var compacted=[],j=0;j<obj.length;++j)void 0!==obj[j]&&compacted.push(obj[j]);item.obj[item.prop]=compacted}}}(queue),value},decode:function(str,decoder,charset){var strWithoutPlus=str.replace(/\+/g," ");if("iso-8859-1"===charset)return strWithoutPlus.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(strWithoutPlus)}catch(e){return strWithoutPlus}},encode:function(str,defaultEncoder,charset){if(0===str.length)return str;var string="string"==typeof str?str:String(str);if("iso-8859-1"===charset)return escape(string).replace(/%u[0-9a-f]{4}/gi,function($0){return"%26%23"+parseInt($0.slice(2),16)+"%3B"});for(var out="",i=0;i<string.length;++i){var c=string.charCodeAt(i);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},isBuffer:function(obj){return!(!obj||"object"!=typeof obj||!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))},isRegExp:function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},merge:function merge(target,source,options){if(!source)return target;if("object"!=typeof source){if(isArray$1(target))target.push(source);else{if(!target||"object"!=typeof target)return[target,source];(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source))&&(target[source]=!0)}return target}if(!target||"object"!=typeof target)return[target].concat(source);var mergeTarget=target;return isArray$1(target)&&!isArray$1(source)&&(mergeTarget=arrayToObject(target,options)),isArray$1(target)&&isArray$1(source)?(source.forEach(function(item,i){if(has.call(target,i)){var targetItem=target[i];targetItem&&"object"==typeof targetItem&&item&&"object"==typeof item?target[i]=merge(targetItem,item,options):target.push(item)}else target[i]=item}),target):Object.keys(source).reduce(function(acc,key){var value=source[key];return has.call(acc,key)?acc[key]=merge(acc[key],value,options):acc[key]=value,acc},mergeTarget)}},replace=String.prototype.replace,percentTwenties=/%20/g,formats={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"},has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},comma:"comma",indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},isArray$2=Array.isArray,push=Array.prototype.push,pushToArray=function(arr,valueOrArray){push.apply(arr,isArray$2(valueOrArray)?valueOrArray:[valueOrArray])},toISO=Date.prototype.toISOString,defaults={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils.encode,encodeValuesOnly:!1,formatter:formats.formatters[formats.default],indices:!1,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},stringify=function stringify(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset){var obj=object;if("function"==typeof filter?obj=filter(prefix,obj):obj instanceof Date?obj=serializeDate(obj):"comma"===generateArrayPrefix&&isArray$2(obj)&&(obj=obj.join(",")),null===obj){if(strictNullHandling)return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset):prefix;obj=""}if("string"==typeof obj||"number"==typeof obj||"boolean"==typeof obj||utils.isBuffer(obj))return encoder?[formatter(encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset))+"="+formatter(encoder(obj,defaults.encoder,charset))]:[formatter(prefix)+"="+formatter(String(obj))];var objKeys,values=[];if(void 0===obj)return values;if(isArray$2(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(isArray$2(obj)?pushToArray(values,stringify(obj[key],"function"==typeof generateArrayPrefix?generateArrayPrefix(prefix,key):prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)):pushToArray(values,stringify(obj[key],prefix+(allowDots?"."+key:"["+key+"]"),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter,encodeValuesOnly,charset)))}return values},lib_stringify=(Object.prototype.hasOwnProperty,function(object,opts){var objKeys,obj=object,options=function(opts){if(!opts)return defaults;if(null!==opts.encoder&&void 0!==opts.encoder&&"function"!=typeof opts.encoder)throw new TypeError("Encoder has to be a function.");var charset=opts.charset||defaults.charset;if(void 0!==opts.charset&&"utf-8"!==opts.charset&&"iso-8859-1"!==opts.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var format=formats.default;if(void 0!==opts.format){if(!has$1.call(formats.formatters,opts.format))throw new TypeError("Unknown format option provided.");format=opts.format}var formatter=formats.formatters[format],filter=defaults.filter;return("function"==typeof opts.filter||isArray$2(opts.filter))&&(filter=opts.filter),{addQueryPrefix:"boolean"==typeof opts.addQueryPrefix?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:void 0===opts.allowDots?defaults.allowDots:!!opts.allowDots,charset:charset,charsetSentinel:"boolean"==typeof opts.charsetSentinel?opts.charsetSentinel:defaults.charsetSentinel,delimiter:void 0===opts.delimiter?defaults.delimiter:opts.delimiter,encode:"boolean"==typeof opts.encode?opts.encode:defaults.encode,encoder:"function"==typeof opts.encoder?opts.encoder:defaults.encoder,encodeValuesOnly:"boolean"==typeof opts.encodeValuesOnly?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,formatter:formatter,serializeDate:"function"==typeof opts.serializeDate?opts.serializeDate:defaults.serializeDate,skipNulls:"boolean"==typeof opts.skipNulls?opts.skipNulls:defaults.skipNulls,sort:"function"==typeof opts.sort?opts.sort:null,strictNullHandling:"boolean"==typeof opts.strictNullHandling?opts.strictNullHandling:defaults.strictNullHandling}}(opts);"function"==typeof options.filter?obj=(0,options.filter)("",obj):isArray$2(options.filter)&&(objKeys=options.filter);var arrayFormat,keys=[];if("object"!=typeof obj||null===obj)return"";arrayFormat=opts&&opts.arrayFormat in arrayPrefixGenerators?opts.arrayFormat:opts&&"indices"in opts?opts.indices?"indices":"repeat":"indices";var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];objKeys||(objKeys=Object.keys(obj)),options.sort&&objKeys.sort(options.sort);for(var i=0;i<objKeys.length;++i){var key=objKeys[i];options.skipNulls&&null===obj[key]||pushToArray(keys,stringify(obj[key],key,generateArrayPrefix,options.strictNullHandling,options.skipNulls,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.formatter,options.encodeValuesOnly,options.charset))}var joined=keys.join(options.delimiter),prefix=!0===options.addQueryPrefix?"?":"";return options.charsetSentinel&&("iso-8859-1"===options.charset?prefix+="utf8=%26%2310003%3B&":prefix+="utf8=%E2%9C%93&"),joined.length>0?prefix+joined:""});function PopupHandler(webAuth){this.webAuth=webAuth,this._current_popup=null,this.options=null}function PluginHandler(webAuth){this.webAuth=webAuth}function CordovaPlugin(){this.webAuth=null,this.version=version.raw,this.extensibilityPoints=["popup.authorize","popup.getPopupHandler"]}return PopupHandler.prototype.preload=function(options){var _this=this,_window=windowHandler.getWindow(),url=options.url||"about:blank",popupOptions=options.popupOptions||{};popupOptions.location="yes",delete popupOptions.width,delete popupOptions.height;var windowFeatures=lib_stringify(popupOptions,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed?this._current_popup:(this._current_popup=_window.open(url,"_blank",windowFeatures),this._current_popup.kill=function(success){_this._current_popup.success=success,this.close(),_this._current_popup=null},this._current_popup)},PopupHandler.prototype.load=function(url,_,options,cb){var _this=this;this.url=url,this.options=options,this._current_popup?this._current_popup.location.href=url:(options.url=url,this.preload(options)),this.transientErrorHandler=function(event){_this.errorHandler(event,cb)},this.transientStartHandler=function(event){_this.startHandler(event,cb)},this.transientExitHandler=function(){_this.exitHandler(cb)},this._current_popup.addEventListener("loaderror",this.transientErrorHandler),this._current_popup.addEventListener("loadstart",this.transientStartHandler),this._current_popup.addEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.errorHandler=function(event,cb){this._current_popup&&(this._current_popup.kill(!0),cb({error:"window_error",errorDescription:event.message}))},PopupHandler.prototype.unhook=function(){this._current_popup.removeEventListener("loaderror",this.transientErrorHandler),this._current_popup.removeEventListener("loadstart",this.transientStartHandler),this._current_popup.removeEventListener("exit",this.transientExitHandler)},PopupHandler.prototype.exitHandler=function(cb){this._current_popup&&(this.unhook(),this._current_popup.success||cb({error:"window_closed",errorDescription:"Browser window closed"}))},PopupHandler.prototype.startHandler=function(event,cb){var _this=this;if(this._current_popup){var callbackUrl=urlJoin("https:",this.webAuth.baseOptions.domain,"/mobile");if(!event.url||0===event.url.indexOf(callbackUrl+"#")){var parts=event.url.split("#");if(1!==parts.length){var opts={hash:parts.pop()};this.options.nonce&&(opts.nonce=this.options.nonce),this.webAuth.parseHash(opts,function(error,result){(error||result)&&(_this._current_popup.kill(!0),cb(error,result))})}}}},PluginHandler.prototype.processParams=function(params){return params.redirectUri=urlJoin("https://"+params.domain,"mobile"),delete params.owp,params},PluginHandler.prototype.getPopupHandler=function(){return new PopupHandler(this.webAuth)},CordovaPlugin.prototype.setWebAuth=function(webAuth){this.webAuth=webAuth},CordovaPlugin.prototype.supports=function(extensibilityPoint){var _window=windowHandler.getWindow();return(!!_window.cordova||!!_window.electron)&&this.extensibilityPoints.indexOf(extensibilityPoint)>-1},CordovaPlugin.prototype.init=function(){return new PluginHandler(this.webAuth)},CordovaPlugin});
//# sourceMappingURL=cordova-auth0-plugin.min.js.map
{
"name": "auth0-js",
"version": "9.11.2",
"version": "9.11.3",
"description": "Auth0 headless browser sdk",

@@ -23,15 +23,13 @@ "author": "Auth0",

],
"engine": {
"node": ">=6.9.0"
},
"scripts": {
"start": "rollup -c --watch",
"build": "rm -rf dist && rm -rf build && rollup -c --prod && cp -rf dist build",
"clean": "rm -rf dist && rm -rf build",
"start": "npm run clean && rollup -c --watch",
"build": "npm run clean && rollup -c --prod && cp -rf dist build",
"test": "cross-env BABEL_ENV=test mocha --require @babel/register --require jsdom-global/register test/**/*.test.js --exit",
"test:coverage": "nyc --check-coverage -- npm test",
"test:integration": "cross-env BABEL_ENV=test mocha-parallel-tests --compilers @babel/register --compilers jsdom-global/register --max-parallel 2 integration/**/*.test.js",
"test:watch": "npm run test -- --watch -R min",
"test:watch": "npm run test -- --watch --reporter min",
"test:es-check:es5": "es-check es5 'dist/!(*.esm)*.js'",
"test:es-check:es2015:module": "es-check es2015 --module 'dist/auth0.min.esm.js'",
"ci:test": "cross-env BABEL_ENV=test nyc npm run test -- --forbid-only -R mocha-multi --reporter-options spec=-,mocha-junit-reporter=-",
"ci:test": "nyc npm run test -- --forbid-only --reporter mocha-junit-reporter",
"ci:coverage": "codecov",

@@ -43,3 +41,3 @@ "lint": "eslint ./src",

"jsdocs": "jsdoc --configure .jsdoc.json --verbose",
"precommit": "lint-staged"
"precommit": "pretty-quick --staged"
},

@@ -51,54 +49,54 @@ "repository": {

"dependencies": {
"base64-js": "^1.2.0",
"base64-js": "^1.3.0",
"idtoken-verifier": "^1.4.1",
"js-cookie": "^2.2.0",
"qs": "^6.4.0",
"qs": "^6.7.0",
"superagent": "^3.8.3",
"url-join": "^4.0.0",
"winchan": "^0.2.1"
"url-join": "^4.0.1",
"winchan": "^0.2.2"
},
"devDependencies": {
"@auth0/component-cdn-uploader": "auth0/component-cdn-uploader#v2.2.2",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"@auth0/component-cdn-uploader": "^2.2.2",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"babel-plugin-istanbul": "^5.1.4",
"codecov": "^3.0.2",
"cross-env": "^5.1.6",
"codecov": "^3.5.0",
"cross-env": "^5.2.0",
"es-check": "^5.0.0",
"eslint": "^4.19.1",
"eslint": "^6.0.1",
"eslint-config-auth0-base": "^13.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-compat": "^2.3.0",
"eslint-plugin-import": "^2.12.0",
"expect.js": "^0.2.0",
"husky": "^0.13.3",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-compat": "^3.3.0",
"eslint-plugin-import": "^2.18.0",
"expect.js": "^0.3.1",
"husky": "^3.0.0",
"istanbul": "^0.4.5",
"jsdoc": "3.5.5",
"jsdoc-to-markdown": "4.0.1",
"jsdoc": "3.6.3",
"jsdoc-to-markdown": "5.0.0",
"jsdom": "^15.1.1",
"jsdom-global": "^3.0.2",
"lint-staged": "^3.4.2",
"lint-staged": "^9.2.0",
"minami": "^1.2.3",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.17.0",
"mocha-multi": "^1.0.1",
"mocha-parallel-tests": "^2.0.2",
"nyc": "^12.0.2",
"prettier": "^1.13.5",
"proxyquire": "^2.0.1",
"rollup": "^0.60.1",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-json": "^3.0.0",
"mocha": "^6.1.4",
"mocha-junit-reporter": "^1.23.1",
"mocha-parallel-tests": "^2.2.1",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"proxyquire": "^2.1.1",
"rollup": "^1.17.0",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-license": "^0.9.0",
"rollup-plugin-livereload": "^0.6.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-serve": "^0.4.2",
"rollup-plugin-livereload": "^1.0.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-serve": "^1.0.1",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-terser": "^1.0.1",
"selenium-webdriver": "^3.0.1",
"semver": "^5.5.0",
"sinon": "^1.17.6",
"yargs": "^11.0.0"
"rollup-plugin-terser": "^5.1.1",
"selenium-webdriver": "^3.6.0",
"semver": "^6.2.0",
"sinon": "^7.3.2",
"yargs": "^13.3.0"
},

@@ -119,10 +117,3 @@ "ccu": {

}
},
"lint-staged": {
"{src,test, plugins,integration}/**/*.js": [
"npm run lint",
"prettier --write --print-width 100 --single-quote",
"git add"
]
}
}

@@ -8,3 +8,3 @@ import urljoin from 'url-join';

PluginHandler.prototype.processParams = function (params) {
PluginHandler.prototype.processParams = function(params) {
params.redirectUri = urljoin('https://' + params.domain, 'mobile');

@@ -15,3 +15,3 @@ delete params.owp;

PluginHandler.prototype.getPopupHandler = function () {
PluginHandler.prototype.getPopupHandler = function() {
return new PopupHandler(this.webAuth);

@@ -18,0 +18,0 @@ };

@@ -81,4 +81,10 @@ import windowHandler from '../../src/helper/window';

PopupHandler.prototype.unhook = function() {
this._current_popup.removeEventListener('loaderror', this.transientErrorHandler);
this._current_popup.removeEventListener('loadstart', this.transientStartHandler);
this._current_popup.removeEventListener(
'loaderror',
this.transientErrorHandler
);
this._current_popup.removeEventListener(
'loadstart',
this.transientStartHandler
);
this._current_popup.removeEventListener('exit', this.transientExitHandler);

@@ -109,3 +115,7 @@ };

var callbackUrl = urljoin('https:', this.webAuth.baseOptions.domain, '/mobile');
var callbackUrl = urljoin(
'https:',
this.webAuth.baseOptions.domain,
'/mobile'
);

@@ -112,0 +122,0 @@ if (event.url && !(event.url.indexOf(callbackUrl + '#') === 0)) {

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

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

@@ -37,0 +37,0 @@

@@ -27,2 +27,3 @@ import urljoin from 'url-join';

* @param {String} options.password user password
* @param {String} [options.username] user desired username. Required if you use a database connection and you have enabled `Requires Username`
* @param {String} options.connection name of the connection where the user will be created

@@ -55,3 +56,7 @@ * @param {Object} [options.userMetadata] additional signup attributes used for creating the user. Will be stored in `user_metadata`

body = objectHelper.blacklist(body, ['scope', 'userMetadata', 'user_metadata']);
body = objectHelper.blacklist(body, [
'scope',
'userMetadata',
'user_metadata'
]);

@@ -101,3 +106,5 @@ body = objectHelper.toSnakeCase(body, ['auth0Client']);

body = objectHelper.merge(this.baseOptions, ['clientID']).with(options, ['email', 'connection']);
body = objectHelper
.merge(this.baseOptions, ['clientID'])
.with(options, ['email', 'connection']);

@@ -104,0 +111,0 @@ body = objectHelper.toSnakeCase(body, ['auth0Client']);

@@ -46,7 +46,23 @@ import urljoin from 'url-join';

clientID: { type: 'string', message: 'clientID option is required' },
responseType: { optional: true, type: 'string', message: 'responseType is not valid' },
responseMode: { optional: true, type: 'string', message: 'responseMode is not valid' },
redirectUri: { optional: true, type: 'string', message: 'redirectUri is not valid' },
responseType: {
optional: true,
type: 'string',
message: 'responseType is not valid'
},
responseMode: {
optional: true,
type: 'string',
message: 'responseMode is not valid'
},
redirectUri: {
optional: true,
type: 'string',
message: 'redirectUri is not valid'
},
scope: { optional: true, type: 'string', message: 'scope is not valid' },
audience: { optional: true, type: 'string', message: 'audience is not valid' },
audience: {
optional: true,
type: 'string',
message: 'audience is not valid'
},
_disableDeprecationWarnings: {

@@ -73,3 +89,5 @@ optional: true,

this.baseOptions._sendTelemetry =
this.baseOptions._sendTelemetry === false ? this.baseOptions._sendTelemetry : true;
this.baseOptions._sendTelemetry === false
? this.baseOptions._sendTelemetry
: true;

@@ -80,3 +98,6 @@ this.baseOptions.rootUrl = 'https://' + this.baseOptions.domain;

this.passwordless = new PasswordlessAuthentication(this.request, this.baseOptions);
this.passwordless = new PasswordlessAuthentication(
this.request,
this.baseOptions
);
this.dbConnection = new DBConnection(this.request, this.baseOptions);

@@ -110,3 +131,6 @@

assert.check(options, { type: 'object', message: 'options parameter is not valid' });
assert.check(options, {
type: 'object',
message: 'options parameter is not valid'
});

@@ -130,4 +154,11 @@ params = objectHelper

clientID: { type: 'string', message: 'clientID option is required' },
redirectUri: { optional: true, type: 'string', message: 'redirectUri option is required' },
responseType: { type: 'string', message: 'responseType option is required' },
redirectUri: {
optional: true,
type: 'string',
message: 'redirectUri option is required'
},
responseType: {
type: 'string',
message: 'responseType option is required'
},
nonce: {

@@ -137,7 +168,18 @@ type: 'string',

condition: function(o) {
return o.responseType.indexOf('code') === -1 && o.responseType.indexOf('id_token') !== -1;
return (
o.responseType.indexOf('code') === -1 &&
o.responseType.indexOf('id_token') !== -1
);
}
},
scope: { optional: true, type: 'string', message: 'scope option is required' },
audience: { optional: true, type: 'string', message: 'audience option is required' }
scope: {
optional: true,
type: 'string',
message: 'scope option is required'
},
audience: {
optional: true,
type: 'string',
message: 'audience option is required'
}
}

@@ -196,3 +238,5 @@ );

params = objectHelper.merge(this.baseOptions, ['clientID']).with(options || {});
params = objectHelper
.merge(this.baseOptions, ['clientID'])
.with(options || {});

@@ -227,2 +271,3 @@ // eslint-disable-next-line

* @param {String} [result.refreshToken] token that can be used to get new access tokens from Auth0. Note that not all Auth0 Applications can request them or the resource server might not allow them.
* @param {Object} [result.appState] values that you receive back on the authentication response
*/

@@ -259,4 +304,12 @@

password: { type: 'string', message: 'password option is required' },
scope: { optional: true, type: 'string', message: 'scope option is required' },
audience: { optional: true, type: 'string', message: 'audience option is required' }
scope: {
optional: true,
type: 'string',
message: 'scope option is required'
},
audience: {
optional: true,
type: 'string',
message: 'audience option is required'
}
}

@@ -291,4 +344,12 @@ );

realm: { type: 'string', message: 'realm option is required' },
scope: { optional: true, type: 'string', message: 'scope option is required' },
audience: { optional: true, type: 'string', message: 'audience option is required' }
scope: {
optional: true,
type: 'string',
message: 'scope option is required'
},
audience: {
optional: true,
type: 'string',
message: 'audience option is required'
}
}

@@ -312,3 +373,6 @@ );

assert.check(options, { type: 'object', message: 'options parameter is not valid' });
assert.check(options, {
type: 'object',
message: 'options parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -318,3 +382,5 @@

body = objectHelper.merge(this.baseOptions, ['clientID', 'scope', 'audience']).with(options);
body = objectHelper
.merge(this.baseOptions, ['clientID', 'scope', 'audience'])
.with(options);

@@ -327,4 +393,12 @@ assert.check(

grantType: { type: 'string', message: 'grantType option is required' },
scope: { optional: true, type: 'string', message: 'scope option is required' },
audience: { optional: true, type: 'string', message: 'audience option is required' }
scope: {
optional: true,
type: 'string',
message: 'scope option is required'
},
audience: {
optional: true,
type: 'string',
message: 'audience option is required'
}
}

@@ -369,3 +443,7 @@ );

connection: { type: 'string', message: 'connection option is required' },
scope: { optional: true, type: 'string', message: 'scope option is required' }
scope: {
optional: true,
type: 'string',
message: 'scope option is required'
}
}

@@ -403,3 +481,4 @@ );

}
var isHostedLoginPage = windowHelper.getWindow().location.host === this.baseOptions.domain;
var isHostedLoginPage =
windowHelper.getWindow().location.host === this.baseOptions.domain;
if (isHostedLoginPage) {

@@ -444,3 +523,4 @@ return this.auth0._universalLogin.getSSOData(withActiveDirectories, cb);

lastUsedUserID: result.idTokenPayload.sub,
lastUsedUsername: result.idTokenPayload.email || result.idTokenPayload.name,
lastUsedUsername:
result.idTokenPayload.email || result.idTokenPayload.name,
lastUsedClientID: clientId,

@@ -471,3 +551,6 @@ sessionClients: [clientId],

assert.check(accessToken, { type: 'string', message: 'accessToken parameter is not valid' });
assert.check(accessToken, {
type: 'string',
message: 'accessToken parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -474,0 +557,0 @@

@@ -23,3 +23,6 @@ import urljoin from 'url-join';

connection: { type: 'string', message: 'connection option is required' },
verificationCode: { type: 'string', message: 'verificationCode option is required' },
verificationCode: {
type: 'string',
message: 'verificationCode option is required'
},
phoneNumber: {

@@ -70,3 +73,8 @@ optional: false,

return urljoin(this.baseOptions.rootUrl, 'passwordless', 'verify_redirect', '?' + qString);
return urljoin(
this.baseOptions.rootUrl,
'passwordless',
'verify_redirect',
'?' + qString
);
};

@@ -106,3 +114,7 @@

},
authParams: { optional: true, type: 'object', message: 'authParams option is required' }
authParams: {
optional: true,
type: 'object',
message: 'authParams option is required'
}
}

@@ -117,3 +129,8 @@ );

body = objectHelper
.merge(this.baseOptions, ['clientID', 'responseType', 'redirectUri', 'scope'])
.merge(this.baseOptions, [
'clientID',
'responseType',
'redirectUri',
'scope'
])
.with(options);

@@ -158,3 +175,6 @@

connection: { type: 'string', message: 'connection option is required' },
verificationCode: { type: 'string', message: 'verificationCode option is required' },
verificationCode: {
type: 'string',
message: 'verificationCode option is required'
},
phoneNumber: {

@@ -161,0 +181,0 @@ optional: false,

@@ -46,6 +46,12 @@ import windowHelper from './window';

default:
throw new Error('Unsupported event listener type: ' + this.eventListenerType);
throw new Error(
'Unsupported event listener type: ' + this.eventListenerType
);
}
this.eventSourceObject.addEventListener(this.eventListenerType, this.proxyEventListener, false);
this.eventSourceObject.addEventListener(
this.eventListenerType,
this.proxyEventListener,
false
);

@@ -52,0 +58,0 @@ _window.document.body.appendChild(this.iframe);

@@ -24,3 +24,7 @@ /* eslint-disable no-continue */

var keysArray = Object.keys(Object(nextSource));
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
for (
var nextIndex = 0, len = keysArray.length;
nextIndex < len;
nextIndex++
) {
var nextKey = keysArray[nextIndex];

@@ -27,0 +31,0 @@ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);

@@ -18,4 +18,10 @@ /* eslint-disable no-restricted-syntax */

var screenX = typeof _window.screenX !== 'undefined' ? _window.screenX : _window.screenLeft;
var screenY = typeof _window.screenY !== 'undefined' ? _window.screenY : _window.screenTop;
var screenX =
typeof _window.screenX !== 'undefined'
? _window.screenX
: _window.screenLeft;
var screenY =
typeof _window.screenY !== 'undefined'
? _window.screenY
: _window.screenTop;

@@ -42,3 +48,5 @@ var outerWidth =

var popupPosition = this.calculatePosition(options.popupOptions || {});
var popupOptions = objectHelper.merge(popupPosition).with(options.popupOptions);
var popupOptions = objectHelper
.merge(popupPosition)
.with(options.popupOptions);
var url = options.url || 'about:blank';

@@ -67,3 +75,5 @@ var windowFeatures = qs.stringify(popupOptions, {

var popupPosition = this.calculatePosition(options.popupOptions || {});
var popupOptions = objectHelper.merge(popupPosition).with(options.popupOptions);
var popupOptions = objectHelper
.merge(popupPosition)
.with(options.popupOptions);

@@ -70,0 +80,0 @@ var winchanOptions = objectHelper

@@ -7,5 +7,7 @@ import windowHelper from './window';

var result = [];
var charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~';
var charset =
'0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~';
var cryptoObj = windowHelper.getWindow().crypto || windowHelper.getWindow().msCrypto;
var cryptoObj =
windowHelper.getWindow().crypto || windowHelper.getWindow().msCrypto;
if (!cryptoObj) {

@@ -12,0 +14,0 @@ return null;

@@ -66,3 +66,4 @@ /* eslint-disable no-param-reassign */

function RequestBuilder(options) {
this._sendTelemetry = options._sendTelemetry === false ? options._sendTelemetry : true;
this._sendTelemetry =
options._sendTelemetry === false ? options._sendTelemetry : true;
this._telemetryInfo = options._telemetryInfo || null;

@@ -74,3 +75,6 @@ this._timesToRetryFailedRequests = options._timesToRetryFailedRequests;

RequestBuilder.prototype.setCommonConfiguration = function(ongoingRequest, options) {
RequestBuilder.prototype.setCommonConfiguration = function(
ongoingRequest,
options
) {
options = options || {};

@@ -96,3 +100,6 @@

if (this._sendTelemetry) {
ongoingRequest = ongoingRequest.set('Auth0-Client', this.getTelemetryData());
ongoingRequest = ongoingRequest.set(
'Auth0-Client',
this.getTelemetryData()
);
}

@@ -120,9 +127,13 @@

RequestBuilder.prototype.post = function(url, options) {
return new RequestObj(this.setCommonConfiguration(request.post(url), options));
return new RequestObj(
this.setCommonConfiguration(request.post(url), options)
);
};
RequestBuilder.prototype.patch = function(url, options) {
return new RequestObj(this.setCommonConfiguration(request.patch(url), options));
return new RequestObj(
this.setCommonConfiguration(request.patch(url), options)
);
};
export default RequestBuilder;

@@ -46,3 +46,4 @@ import error from './error';

errObj.code = err.code || err.error || err.error_code || err.status || null;
errObj.code =
err.code || err.error || err.error_code || err.status || null;
errObj.description =

@@ -72,3 +73,6 @@ err.errorDescription ||

if (data.type && (data.type === 'text/html' || data.type === 'text/plain')) {
if (
data.type &&
(data.type === 'text/html' || data.type === 'text/plain')
) {
return cb(null, data.text);

@@ -83,3 +87,5 @@ }

null,
objectHelper.toCamelCase(data.body || data, [], { keepOriginal: options.keepOriginalCasing })
objectHelper.toCamelCase(data.body || data, [], {
keepOriginal: options.keepOriginalCasing
})
);

@@ -86,0 +92,0 @@ };

@@ -38,6 +38,12 @@ import urljoin from 'url-join';

this.baseOptions.headers = { Authorization: 'Bearer ' + this.baseOptions.token };
this.baseOptions.headers = {
Authorization: 'Bearer ' + this.baseOptions.token
};
this.request = new RequestBuilder(this.baseOptions);
this.baseOptions.rootUrl = urljoin('https://' + this.baseOptions.domain, 'api', 'v2');
this.baseOptions.rootUrl = urljoin(
'https://' + this.baseOptions.domain,
'api',
'v2'
);
}

@@ -62,3 +68,6 @@

assert.check(userId, { type: 'string', message: 'userId parameter is not valid' });
assert.check(userId, {
type: 'string',
message: 'userId parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -84,4 +93,10 @@

assert.check(userId, { type: 'string', message: 'userId parameter is not valid' });
assert.check(userMetadata, { type: 'object', message: 'userMetadata parameter is not valid' });
assert.check(userId, {
type: 'string',
message: 'userId parameter is not valid'
});
assert.check(userMetadata, {
type: 'object',
message: 'userMetadata parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -109,4 +124,10 @@

assert.check(userId, { type: 'string', message: 'userId parameter is not valid' });
assert.check(user, { type: 'object', message: 'user parameter is not valid' });
assert.check(userId, {
type: 'string',
message: 'userId parameter is not valid'
});
assert.check(user, {
type: 'object',
message: 'user parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -134,3 +155,6 @@

/* eslint-disable */
assert.check(userId, { type: 'string', message: 'userId parameter is not valid' });
assert.check(userId, {
type: 'string',
message: 'userId parameter is not valid'
});
assert.check(secondaryUserToken, {

@@ -137,0 +161,0 @@ type: 'string',

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

module.exports = { raw: '9.11.2' };
module.exports = { raw: '9.11.3' };

@@ -32,3 +32,7 @@ import urljoin from 'url-join';

function createKey(origin, coId) {
return ['co/verifier', encodeURIComponent(origin), encodeURIComponent(coId)].join('/');
return [
'co/verifier',
encodeURIComponent(origin),
encodeURIComponent(coId)
].join('/');
}

@@ -90,3 +94,8 @@

var popupMode = options.popup === true;
options = objectHelper.blacklist(options, ['password', 'credentialType', 'otp', 'popup']);
options = objectHelper.blacklist(options, [
'password',
'credentialType',
'otp',
'popup'
]);
var authorizeOptions = objectHelper

@@ -96,3 +105,5 @@ .merge(options)

var key = createKey(_this.baseOptions.rootUrl, data.body.co_id);
_this.storage.setItem(key, data.body.co_verifier, { expires: times.MINUTES_15 });
_this.storage.setItem(key, data.body.co_verifier, {
expires: times.MINUTES_15
});
if (popupMode) {

@@ -99,0 +110,0 @@ _this.webMessageHandler.run(

@@ -48,3 +48,5 @@ import urljoin from 'url-join';

if (windowHelper.getWindow().location.host !== this.baseOptions.domain) {
throw new Error('This method is meant to be used only inside the Universal Login Page.');
throw new Error(
'This method is meant to be used only inside the Universal Login Page.'
);
}

@@ -73,3 +75,6 @@ var usernamePassword;

{
responseType: { type: 'string', message: 'responseType option is required' }
responseType: {
type: 'string',
message: 'responseType option is required'
}
}

@@ -76,0 +81,0 @@ );

@@ -43,10 +43,38 @@ import IdTokenVerifier from 'idtoken-verifier';

clientID: { type: 'string', message: 'clientID option is required' },
responseType: { optional: true, type: 'string', message: 'responseType is not valid' },
responseMode: { optional: true, type: 'string', message: 'responseMode is not valid' },
redirectUri: { optional: true, type: 'string', message: 'redirectUri is not valid' },
responseType: {
optional: true,
type: 'string',
message: 'responseType is not valid'
},
responseMode: {
optional: true,
type: 'string',
message: 'responseMode is not valid'
},
redirectUri: {
optional: true,
type: 'string',
message: 'redirectUri is not valid'
},
scope: { optional: true, type: 'string', message: 'scope is not valid' },
audience: { optional: true, type: 'string', message: 'audience is not valid' },
popupOrigin: { optional: true, type: 'string', message: 'popupOrigin is not valid' },
leeway: { optional: true, type: 'number', message: 'leeway is not valid' },
plugins: { optional: true, type: 'array', message: 'plugins is not valid' },
audience: {
optional: true,
type: 'string',
message: 'audience is not valid'
},
popupOrigin: {
optional: true,
type: 'string',
message: 'popupOrigin is not valid'
},
leeway: {
optional: true,
type: 'number',
message: 'leeway is not valid'
},
plugins: {
optional: true,
type: 'array',
message: 'plugins is not valid'
},
_disableDeprecationWarnings: {

@@ -80,3 +108,7 @@ optional: true,

{
__tenant: { optional: true, type: 'string', message: '__tenant option is required' },
__tenant: {
optional: true,
type: 'string',
message: '__tenant option is required'
},
__token_issuer: {

@@ -87,3 +119,7 @@ optional: true,

},
__jwks_uri: { optional: true, type: 'string', message: '__jwks_uri is required' }
__jwks_uri: {
optional: true,
type: 'string',
message: '__jwks_uri is required'
}
}

@@ -95,6 +131,11 @@ );

this.baseOptions = options;
this.baseOptions.plugins = new PluginHandler(this, this.baseOptions.plugins || []);
this.baseOptions.plugins = new PluginHandler(
this,
this.baseOptions.plugins || []
);
this.baseOptions._sendTelemetry =
this.baseOptions._sendTelemetry === false ? this.baseOptions._sendTelemetry : true;
this.baseOptions._sendTelemetry === false
? this.baseOptions._sendTelemetry
: true;

@@ -113,3 +154,4 @@ this.baseOptions._timesToRetryFailedRequests = options._timesToRetryFailedRequests

this.baseOptions.jwksURI = this.baseOptions.overrides && this.baseOptions.overrides.__jwks_uri;
this.baseOptions.jwksURI =
this.baseOptions.overrides && this.baseOptions.overrides.__jwks_uri;

@@ -121,3 +163,6 @@ this.transactionManager = new TransactionManager(this.baseOptions);

this.popup = new Popup(this, this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(this, this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(
this,
this.baseOptions
);
this.webMessageHandler = new WebMessageHandler(this);

@@ -159,3 +204,4 @@ this._universalLogin = new HostedPages(this, this.baseOptions);

var hashStr = options.hash === undefined ? _window.location.hash : options.hash;
var hashStr =
options.hash === undefined ? _window.location.hash : options.hash;
hashStr = hashStr.replace(/^#?\/?/, '');

@@ -182,3 +228,7 @@

}
var responseTypes = (this.baseOptions.responseType || options.responseType || '').split(' ');
var responseTypes = (
this.baseOptions.responseType ||
options.responseType ||
''
).split(' ');
if (

@@ -229,3 +279,7 @@ responseTypes.length > 0 &&

*/
WebAuth.prototype.validateAuthenticationResponse = function(options, parsedHash, cb) {
WebAuth.prototype.validateAuthenticationResponse = function(
options,
parsedHash,
cb
) {
var _this = this;

@@ -236,6 +290,8 @@ options.__enableIdPInitiatedLogin =

var transaction = this.transactionManager.getStoredTransaction(state);
var transactionState = options.state || (transaction && transaction.state) || null;
var transactionState =
options.state || (transaction && transaction.state) || null;
var transactionStateMatchesState = transactionState === state;
var shouldBypassStateChecking = !state && !transactionState && options.__enableIdPInitiatedLogin;
var shouldBypassStateChecking =
!state && !transactionState && options.__enableIdPInitiatedLogin;

@@ -248,3 +304,4 @@ if (!shouldBypassStateChecking && !transactionStateMatchesState) {

}
var transactionNonce = options.nonce || (transaction && transaction.nonce) || null;
var transactionNonce =
options.nonce || (transaction && transaction.nonce) || null;

@@ -323,3 +380,6 @@ var appState = options.state || (transaction && transaction.appState) || null;

// if the alg is HS256, use the /userinfo endpoint to build the payload
return _this.client.userInfo(parsedHash.access_token, function(errUserInfo, profile) {
return _this.client.userInfo(parsedHash.access_token, function(
errUserInfo,
profile
) {
// if the /userinfo request fails, use the validationError instead

@@ -407,3 +467,4 @@ if (errUserInfo) {

var postMessageDataType = options.postMessageDataType || false;
var postMessageOrigin = options.postMessageOrigin || windowHelper.getWindow().origin;
var postMessageOrigin =
options.postMessageOrigin || windowHelper.getWindow().origin;
var timeout = options.timeout;

@@ -430,3 +491,6 @@ var _this = this;

assert.check(params, { type: 'object', message: 'options parameter is not valid' });
assert.check(params, {
type: 'object',
message: 'options parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

@@ -489,3 +553,6 @@

if (params.responseType === 'code') {
return cb({ error: 'error', error_description: "responseType can't be `code`" });
return cb({
error: 'error',
error_description: "responseType can't be `code`"
});
}

@@ -498,9 +565,19 @@

if (!params.redirectUri) {
return cb({ error: 'error', error_description: "redirectUri can't be empty" });
return cb({
error: 'error',
error_description: "redirectUri can't be empty"
});
}
assert.check(params, { type: 'object', message: 'options parameter is not valid' });
assert.check(params, {
type: 'object',
message: 'options parameter is not valid'
});
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });
params = objectHelper.blacklist(params, ['usePostMessage', 'tenant', 'postMessageDataType']);
params = objectHelper.blacklist(params, [
'usePostMessage',
'tenant',
'postMessageDataType'
]);
this.webMessageHandler.run(

@@ -587,2 +664,3 @@ params,

* @param {String} [options.audience] identifier of the resource server who will consume the access token issued after Auth
* @param {Object} [options.appState] any values that you want back on the authentication response
* @see {@link https://auth0.com/docs/api/authentication#authorize-client}

@@ -610,3 +688,6 @@ */

{
responseType: { type: 'string', message: 'responseType option is required' }
responseType: {
type: 'string',
message: 'responseType option is required'
}
}

@@ -690,3 +771,4 @@ );

var isHostedLoginPage = windowHelper.getWindow().location.host === this.baseOptions.domain;
var isHostedLoginPage =
windowHelper.getWindow().location.host === this.baseOptions.domain;
if (isHostedLoginPage) {

@@ -729,3 +811,4 @@ params.connection = params.realm;

var isHostedLoginPage = windowHelper.getWindow().location.host === this.baseOptions.domain;
var isHostedLoginPage =
windowHelper.getWindow().location.host === this.baseOptions.domain;
if (isHostedLoginPage) {

@@ -741,3 +824,8 @@ this.passwordlessVerify(params, cb);

},
objectHelper.blacklist(params, ['connection', 'email', 'phoneNumber', 'verificationCode'])
objectHelper.blacklist(params, [
'connection',
'email',
'phoneNumber',
'verificationCode'
])
);

@@ -819,3 +907,6 @@ this.crossOriginAuthentication.login(crossOriginOptions, cb);

{
responseType: { type: 'string', message: 'responseType option is required' }
responseType: {
type: 'string',
message: 'responseType option is required'
}
}

@@ -829,3 +920,5 @@ );

}
return windowHelper.redirect(_this.client.passwordless.buildVerifyUrl(params));
return windowHelper.redirect(
_this.client.passwordless.buildVerifyUrl(params)
);
});

@@ -832,0 +925,0 @@ };

@@ -21,3 +21,6 @@ import urljoin from 'url-join';

this.transactionManager = new TransactionManager(this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(webAuth, this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(
webAuth,
this.baseOptions
);
this.warn = new Warn({

@@ -91,3 +94,6 @@ disableWarnings: !!options._disableDeprecationWarnings

options = options || {};
var originUrl = options.popupOrigin || this.baseOptions.popupOrigin || windowHelper.getOrigin();
var originUrl =
options.popupOrigin ||
this.baseOptions.popupOrigin ||
windowHelper.getOrigin();

@@ -174,3 +180,6 @@ /*

{
responseType: { type: 'string', message: 'responseType option is required' }
responseType: {
type: 'string',
message: 'responseType option is required'
}
}

@@ -214,3 +223,8 @@ );

return popup.load(url, relayUrl, popOpts, responseHandler(cb, { keepOriginalCasing: true }));
return popup.load(
url,
relayUrl,
popOpts,
responseHandler(cb, { keepOriginalCasing: true })
);
};

@@ -217,0 +231,0 @@

@@ -7,3 +7,6 @@ import CrossOriginAuthentication from './cross-origin-authentication';

this.baseOptions = options;
this.crossOriginAuthentication = new CrossOriginAuthentication(auth0, this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(
auth0,
this.baseOptions
);

@@ -10,0 +13,0 @@ this.warn = new Warn({

@@ -17,3 +17,5 @@ import IframeHandler from '../helper/iframe-handler';

windowHelper.getWindow().location.hostname +
(windowHelper.getWindow().location.port ? ':' + windowHelper.getWindow().location.port : '');
(windowHelper.getWindow().location.port
? ':' + windowHelper.getWindow().location.port
: '');
}

@@ -25,3 +27,6 @@

SilentAuthenticationHandler.prototype.login = function(usePostMessage, callback) {
SilentAuthenticationHandler.prototype.login = function(
usePostMessage,
callback
) {
this.handler = new IframeHandler({

@@ -35,3 +40,6 @@ auth0: this.auth0,

timeoutCallback: function() {
callback(null, '#error=timeout&error_description=Timeout+during+authentication+renew.');
callback(
null,
'#error=timeout&error_description=Timeout+during+authentication+renew.'
);
},

@@ -64,7 +72,10 @@ usePostMessage: usePostMessage || false

return (
eventData.event.data.type && eventData.event.data.type === _this.postMessageDataType
eventData.event.data.type &&
eventData.event.data.type === _this.postMessageDataType
);
case 'load':
if (eventData.sourceObject.contentWindow.location.protocol === 'about:') {
if (
eventData.sourceObject.contentWindow.location.protocol === 'about:'
) {
// Chrome is automatically loading the about:blank page, we ignore this.

@@ -81,3 +92,6 @@ return false;

SilentAuthenticationHandler.prototype.getCallbackHandler = function(callback, usePostMessage) {
SilentAuthenticationHandler.prototype.getCallbackHandler = function(
callback,
usePostMessage
) {
return function(eventData) {

@@ -87,3 +101,6 @@ var callbackValue;

callbackValue = eventData.sourceObject.contentWindow.location.hash;
} else if (typeof eventData.event.data === 'object' && eventData.event.data.hash) {
} else if (
typeof eventData.event.data === 'object' &&
eventData.event.data.hash
) {
callbackValue = eventData.event.data.hash;

@@ -90,0 +107,0 @@ } else {

@@ -21,3 +21,4 @@ import random from '../helper/random';

var lastUsedConnection = options.realm || options.connection;
var responseTypeIncludesIdToken = options.responseType.indexOf('id_token') !== -1;
var responseTypeIncludesIdToken =
options.responseType.indexOf('id_token') !== -1;

@@ -51,3 +52,4 @@ var transaction = this.generateTransaction(

nonce = nonce || (generateNonce ? random.randomString(this.keyLength) : null);
var isHostedLoginPage = windowHelper.getWindow().location.host === this.options.domain;
var isHostedLoginPage =
windowHelper.getWindow().location.host === this.options.domain;
if (!isHostedLoginPage) {

@@ -54,0 +56,0 @@ this.storage.setItem(

@@ -57,27 +57,32 @@ import IframeHandler from '../helper/iframe-handler';

runWebMessageFlow(this.webAuth.client.buildAuthorizeUrl(options), options, function(
err,
eventData
) {
var error = err;
if (!err && eventData.event.data.response.error) {
error = eventData.event.data.response;
runWebMessageFlow(
this.webAuth.client.buildAuthorizeUrl(options),
options,
function(err, eventData) {
var error = err;
if (!err && eventData.event.data.response.error) {
error = eventData.event.data.response;
}
if (!error) {
var parsedHash = eventData.event.data.response;
return _this.webAuth.validateAuthenticationResponse(
options,
parsedHash,
cb
);
}
if (
error.error === 'consent_required' &&
windowHelper.getWindow().location.hostname === 'localhost'
) {
_this.warn.warning(
"Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"
);
}
_this.webAuth.transactionManager.clearTransaction(error.state);
return cb(objectHelper.pick(error, ['error', 'error_description']));
}
if (!error) {
var parsedHash = eventData.event.data.response;
return _this.webAuth.validateAuthenticationResponse(options, parsedHash, cb);
}
if (
error.error === 'consent_required' &&
windowHelper.getWindow().location.hostname === 'localhost'
) {
_this.warn.warning(
"Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"
);
}
_this.webAuth.transactionManager.clearTransaction(error.state);
return cb(objectHelper.pick(error, ['error', 'error_description']));
});
);
};
export default WebMessageHandler;

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 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

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

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