binnacle 0.4.9 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +15 -15
  4. data/lib/binnacle/version.rb +1 -1
  5. data/lib/generators/binnacle/templates/firebase-messaging-sw.js.erb +2 -2
  6. data/spec/commands_spec.rb +6 -6
  7. data/vendor/assets/javascripts/base64/base64.js +6 -2
  8. data/vendor/assets/javascripts/binnacle/binnacle.js +335 -619
  9. data/vendor/assets/javascripts/firebase/firebase-app-externs.js +46 -2
  10. data/vendor/assets/javascripts/firebase/firebase-app.js +5 -35
  11. data/vendor/assets/javascripts/firebase/firebase-auth-externs.js +684 -36
  12. data/vendor/assets/javascripts/firebase/firebase-auth.js +293 -241
  13. data/vendor/assets/javascripts/firebase/firebase-database-externs.js +48 -1
  14. data/vendor/assets/javascripts/firebase/firebase-database.js +22 -254
  15. data/vendor/assets/javascripts/firebase/firebase-messaging-externs.js +29 -10
  16. data/vendor/assets/javascripts/firebase/firebase-messaging.js +5 -35
  17. data/vendor/assets/javascripts/firebase/firebase-storage-externs.js +30 -10
  18. data/vendor/assets/javascripts/firebase/firebase-storage.js +5 -52
  19. data/vendor/assets/javascripts/firebase/firebase.js +319 -605
  20. data/vendor/assets/javascripts/moment/min/locales.min.js +498 -0
  21. data/vendor/assets/javascripts/moment/min/moment-with-locales.js +3 -3
  22. data/vendor/assets/javascripts/moment/min/moment-with-locales.min.js +505 -0
  23. data/vendor/assets/javascripts/moment/min/moment.min.js +2 -2
  24. data/vendor/assets/javascripts/moment/moment.js +3 -3
  25. data/vendor/assets/javascripts/moment/src/lib/locale/set.js +1 -1
  26. data/vendor/assets/javascripts/moment/src/moment.js +2 -2
  27. metadata +4 -2
@@ -1,6 +1,25 @@
1
+ /*! @license Firebase v4.2.0
2
+ Build: rev-d6b2db4
3
+ Terms: https://firebase.google.com/terms/ */
4
+
5
+ /**
6
+ * Copyright 2017 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
1
20
  /**
2
21
  * @fileoverview Firebase namespace and Firebase App API.
3
- * Version: 3.7.1
22
+ * Version: 4.2.0
4
23
  *
5
24
  * Copyright 2017 Google Inc. All Rights Reserved.
6
25
  *
@@ -140,7 +159,6 @@ firebase.app.App.prototype.name;
140
159
  *
141
160
  * @example
142
161
  * var app = firebase.initializeApp(config);
143
- * console.log(app.options.credential === config.credential); // true
144
162
  * console.log(app.options.databaseURL === config.databaseURL); // true
145
163
  *
146
164
  * @type {!Object}
@@ -219,6 +237,7 @@ firebase.Promise = function(resolver) {};
219
237
  * @param {(function(!Error): *)=} onReject Called when the Promise is rejected
220
238
  * (with an error).
221
239
  * @return {!firebase.Promise<*>}
240
+ * @override
222
241
  */
223
242
  firebase.Promise.prototype.then = function(onResolve, onReject) {};
224
243
 
@@ -227,6 +246,7 @@ firebase.Promise.prototype.then = function(onResolve, onReject) {};
227
246
  *
228
247
  * @param {(function(!Error): *)=} onReject Called when the Promise is rejected
229
248
  * (with an error).
249
+ * @override
230
250
  */
231
251
  firebase.Promise.prototype.catch = function(onReject) {};
232
252
 
@@ -259,3 +279,27 @@ firebase.Promise.reject = function(error) {};
259
279
  * @return {!firebase.Promise<!Array<*>>}
260
280
  */
261
281
  firebase.Promise.all = function(values) {};
282
+
283
+ /**
284
+ * @template V, E
285
+ * @interface
286
+ **/
287
+ firebase.Observer = function() {};
288
+
289
+ /**
290
+ * @param {?V} value
291
+ */
292
+ firebase.Observer.prototype.next = function(value) {};
293
+
294
+ /**
295
+ * @param {!E} error
296
+ */
297
+ firebase.Observer.prototype.error = function(error) {};
298
+
299
+ firebase.Observer.prototype.complete = function() {};
300
+
301
+ /** @typedef {function(): void} */
302
+ firebase.CompleteFn;
303
+
304
+ /** @typedef {function(): void} */
305
+ firebase.Unsubscribe;
@@ -1,35 +1,5 @@
1
- /*! @license Firebase v3.7.1
2
- Build: 3.7.1-rc.1
3
- Terms: https://firebase.google.com/terms/ */
4
- var firebase = null; (function() { var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},k="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,l=function(){l=function(){};k.Symbol||(k.Symbol=ba)},ca=0,ba=function(a){return"jscomp_symbol_"+(a||"")+ca++},n=function(){l();var a=k.Symbol.iterator;a||(a=k.Symbol.iterator=
5
- k.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return m(this)}});n=function(){}},m=function(a){var b=0;return da(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})},da=function(a){n();a={next:a};a[k.Symbol.iterator]=function(){return this};return a},q=this,r=function(){},t=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);
6
- if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},v=function(a){return"function"==t(a)},ea=function(a,
7
- b,c){return a.call.apply(a.bind,arguments)},fa=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},w=function(a,b,c){w=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ea:fa;return w.apply(null,arguments)},x=function(a,b){var c=Array.prototype.slice.call(arguments,
8
- 1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},y=function(a,b){function c(){}c.prototype=b.prototype;a.ha=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,h){for(var e=Array(arguments.length-2),d=2;d<arguments.length;d++)e[d-2]=arguments[d];return b.prototype[c].apply(a,e)}};var A;A="undefined"!==typeof window?window:"undefined"!==typeof self?self:global;
9
- var __extends=function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},__assign=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e])}return a},__rest=function(a,b){var c={},d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"===typeof Object.getOwnPropertySymbols){var e=
10
- 0;for(d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&(c[d[e]]=a[d[e]])}return c},__decorate=function(a,b,c,d){var e=arguments.length,h=3>e?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d,g;g=A.Reflect;if("object"===typeof g&&"function"===typeof g.decorate)h=g.decorate(a,b,c,d);else for(var f=a.length-1;0<=f;f--)if(g=a[f])h=(3>e?g(h):3<e?g(b,c,h):g(b,c))||h;return 3<e&&h&&Object.defineProperty(b,c,h),h},__metadata=function(a,b){var c=A.Reflect;if("object"===typeof c&&"function"===
11
- typeof c.metadata)return c.metadata(a,b)},__param=function(a,b){return function(c,d){b(c,d,a)}},__awaiter=function(a,b,c,d){return new (c||(c=Promise))(function(e,h){function g(a){try{p(d.next(a))}catch(u){h(u)}}function f(a){try{p(d["throw"](a))}catch(u){h(u)}}function p(a){a.done?e(a.value):(new c(function(b){b(a.value)})).then(g,f)}p((d=d.apply(a,b)).next())})},__generator=function(a,b){function c(a){return function(b){return d([a,b])}}function d(c){if(h)throw new TypeError("Generator is already executing.");
12
- for(;e;)try{if(h=1,g&&(f=g[c[0]&2?"return":c[0]?"throw":"next"])&&!(f=f.call(g,c[1])).done)return f;if(g=0,f)c=[0,f.value];switch(c[0]){case 0:case 1:f=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;g=c[1];c=[0];continue;case 7:c=e.G.pop();e.I.pop();continue;default:if(!(f=e.I,f=0<f.length&&f[f.length-1])&&(6===c[0]||2===c[0])){e=0;continue}if(3===c[0]&&(!f||c[1]>f[0]&&c[1]<f[3]))e.label=c[1];else if(6===c[0]&&e.label<f[1])e.label=f[1],f=c;else if(f&&e.label<f[2])e.label=f[2],
13
- e.G.push(c);else{f[2]&&e.G.pop();e.I.pop();continue}}c=b.call(a,e)}catch(z){c=[6,z],g=0}finally{h=f=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}var e={label:0,ga:function(){if(f[0]&1)throw f[1];return f[1]},I:[],G:[]},h,g,f;return{next:c(0),"throw":c(1),"return":c(2)}};
14
- "undefined"!==typeof A.S&&A.S||(A.__extends=__extends,A.__assign=__assign,A.__rest=__rest,A.__extends=__extends,A.__decorate=__decorate,A.__metadata=__metadata,A.__param=__param,A.__awaiter=__awaiter,A.__generator=__generator);var B=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,B);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};y(B,Error);B.prototype.name="CustomError";var ga=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};var C=function(a,b){b.unshift(a);B.call(this,ga.apply(null,b));b.shift()};y(C,B);C.prototype.name="AssertionError";var ha=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),h=d;else a&&(e+=": "+a,h=b);throw new C(""+e,h||[]);},D=function(a,b,c){a||ha("",null,b,Array.prototype.slice.call(arguments,2))},E=function(a,b,c){v(a)||ha("Expected function but got %s: %s.",[t(a),a],b,Array.prototype.slice.call(arguments,2))};var F=function(a,b,c){this.Y=c;this.T=a;this.Z=b;this.s=0;this.o=null};F.prototype.get=function(){var a;0<this.s?(this.s--,a=this.o,this.o=a.next,a.next=null):a=this.T();return a};F.prototype.put=function(a){this.Z(a);this.s<this.Y&&(this.s++,a.next=this.o,this.o=a)};var G;a:{var ia=q.navigator;if(ia){var ja=ia.userAgent;if(ja){G=ja;break a}}G=""};var ka=function(a){q.setTimeout(function(){throw a;},0)},H,la=function(){var a=q.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&-1==G.indexOf("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+
15
- "//"+b.location.host,a=w(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&-1==G.indexOf("Trident")&&-1==G.indexOf("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var a=c.J;c.J=null;a()}};return function(a){d.next={J:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in
16
- document.createElement("SCRIPT")?function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){q.setTimeout(a,0)}};var I=function(){this.v=this.g=null},ma=new F(function(){return new J},function(a){a.reset()},100);I.prototype.add=function(a,b){var c=ma.get();c.set(a,b);this.v?this.v.next=c:(D(!this.g),this.g=c);this.v=c};I.prototype.remove=function(){var a=null;this.g&&(a=this.g,this.g=this.g.next,this.g||(this.v=null),a.next=null);return a};var J=function(){this.next=this.scope=this.B=null};J.prototype.set=function(a,b){this.B=a;this.scope=b;this.next=null};
17
- J.prototype.reset=function(){this.next=this.scope=this.B=null};var M=function(a,b){K||na();L||(K(),L=!0);oa.add(a,b)},K,na=function(){if(-1!=String(q.Promise).indexOf("[native code]")){var a=q.Promise.resolve(void 0);K=function(){a.then(pa)}}else K=function(){var a=pa;!v(q.setImmediate)||q.Window&&q.Window.prototype&&-1==G.indexOf("Edge")&&q.Window.prototype.setImmediate==q.setImmediate?(H||(H=la()),H(a)):q.setImmediate(a)}},L=!1,oa=new I,pa=function(){for(var a;a=oa.remove();){try{a.B.call(a.scope)}catch(b){ka(b)}ma.put(a)}L=!1};var O=function(a,b){this.b=0;this.R=void 0;this.j=this.h=this.u=null;this.m=this.A=!1;if(a!=r)try{var c=this;a.call(b,function(a){N(c,2,a)},function(a){try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(e){}N(c,3,a)})}catch(d){N(this,3,d)}},qa=function(){this.next=this.context=this.i=this.f=this.child=null;this.w=!1};qa.prototype.reset=function(){this.context=this.i=this.f=this.child=null;this.w=!1};
18
- var ra=new F(function(){return new qa},function(a){a.reset()},100),sa=function(a,b,c){var d=ra.get();d.f=a;d.i=b;d.context=c;return d},ua=function(a,b,c){ta(a,b,c,null)||M(x(b,a))};O.prototype.then=function(a,b,c){null!=a&&E(a,"opt_onFulfilled should be a function.");null!=b&&E(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return va(this,v(a)?a:null,v(b)?b:null,c)};O.prototype.then=O.prototype.then;O.prototype.$goog_Thenable=!0;
19
- O.prototype.ba=function(a,b){return va(this,null,a,b)};var xa=function(a,b){a.h||2!=a.b&&3!=a.b||wa(a);D(null!=b.f);a.j?a.j.next=b:a.h=b;a.j=b},va=function(a,b,c,d){var e=sa(null,null,null);e.child=new O(function(a,g){e.f=b?function(c){try{var e=b.call(d,c);a(e)}catch(z){g(z)}}:a;e.i=c?function(b){try{var e=c.call(d,b);a(e)}catch(z){g(z)}}:g});e.child.u=a;xa(a,e);return e.child};O.prototype.da=function(a){D(1==this.b);this.b=0;N(this,2,a)};
20
- O.prototype.ea=function(a){D(1==this.b);this.b=0;N(this,3,a)};
21
- var N=function(a,b,c){0==a.b&&(a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself")),a.b=1,ta(c,a.da,a.ea,a)||(a.R=c,a.b=b,a.u=null,wa(a),3!=b||ya(a,c)))},ta=function(a,b,c,d){if(a instanceof O)return null!=b&&E(b,"opt_onFulfilled should be a function."),null!=c&&E(c,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),xa(a,sa(b||r,c||null,d)),!0;var e;if(a)try{e=!!a.$goog_Thenable}catch(g){e=!1}else e=!1;if(e)return a.then(b,c,d),
22
- !0;e=typeof a;if("object"==e&&null!=a||"function"==e)try{var h=a.then;if(v(h))return za(a,h,b,c,d),!0}catch(g){return c.call(d,g),!0}return!1},za=function(a,b,c,d,e){var h=!1,g=function(a){h||(h=!0,c.call(e,a))},f=function(a){h||(h=!0,d.call(e,a))};try{b.call(a,g,f)}catch(p){f(p)}},wa=function(a){a.A||(a.A=!0,M(a.V,a))},Aa=function(a){var b=null;a.h&&(b=a.h,a.h=b.next,b.next=null);a.h||(a.j=null);null!=b&&D(null!=b.f);return b};
23
- O.prototype.V=function(){for(var a;a=Aa(this);){var b=this.b,c=this.R;if(3==b&&a.i&&!a.w){var d;for(d=this;d&&d.m;d=d.u)d.m=!1}if(a.child)a.child.u=null,Ba(a,b,c);else try{a.w?a.f.call(a.context):Ba(a,b,c)}catch(e){Ca.call(null,e)}ra.put(a)}this.A=!1};var Ba=function(a,b,c){2==b?a.f.call(a.context,c):a.i&&a.i.call(a.context,c)},ya=function(a,b){a.m=!0;M(function(){a.m&&Ca.call(null,b)})},Ca=ka;function P(a,b){if(!(b instanceof Object))return b;switch(b.constructor){case Date:return new Date(b.getTime());case Object:void 0===a&&(a={});break;case Array:a=[];break;default:return b}for(var c in b)b.hasOwnProperty(c)&&(a[c]=P(a[c],b[c]));return a};O.all=function(a){return new O(function(b,c){var d=a.length,e=[];if(d)for(var h=function(a,c){d--;e[a]=c;0==d&&b(e)},g=function(a){c(a)},f=0,p;f<a.length;f++)p=a[f],ua(p,x(h,f),g);else b(e)})};O.resolve=function(a){if(a instanceof O)return a;var b=new O(r);N(b,2,a);return b};O.reject=function(a){return new O(function(b,c){c(a)})};O.prototype["catch"]=O.prototype.ba;var Q=O;"undefined"!==typeof Promise&&(Q=Promise);var Da=Q;function Ea(a,b){a=new R(a,b);return a.subscribe.bind(a)}var R=function(a,b){var c=this;this.a=[];this.P=0;this.task=Da.resolve();this.l=!1;this.F=b;this.task.then(function(){a(c)}).catch(function(a){c.error(a)})};R.prototype.next=function(a){S(this,function(b){b.next(a)})};R.prototype.error=function(a){S(this,function(b){b.error(a)});this.close(a)};R.prototype.complete=function(){S(this,function(a){a.complete()});this.close()};
24
- R.prototype.subscribe=function(a,b,c){var d=this,e;if(void 0===a&&void 0===b&&void 0===c)throw Error("Missing Observer.");e=Fa(a)?a:{next:a,error:b,complete:c};void 0===e.next&&(e.next=T);void 0===e.error&&(e.error=T);void 0===e.complete&&(e.complete=T);a=this.fa.bind(this,this.a.length);this.l&&this.task.then(function(){try{d.K?e.error(d.K):e.complete()}catch(h){}});this.a.push(e);return a};
25
- R.prototype.fa=function(a){void 0!==this.a&&void 0!==this.a[a]&&(delete this.a[a],--this.P,0===this.P&&void 0!==this.F&&this.F(this))};var S=function(a,b){if(!a.l)for(var c=0;c<a.a.length;c++)Ga(a,c,b)},Ga=function(a,b,c){a.task.then(function(){if(void 0!==a.a&&void 0!==a.a[b])try{c(a.a[b])}catch(d){"undefined"!==typeof console&&console.error&&console.error(d)}})};R.prototype.close=function(a){var b=this;this.l||(this.l=!0,void 0!==a&&(this.K=a),this.task.then(function(){b.a=void 0;b.F=void 0}))};
26
- function Fa(a){if("object"!==typeof a||null===a)return!1;var b;b=["next","error","complete"];n();var c=b[Symbol.iterator];b=c?c.call(b):m(b);for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a&&"function"===typeof a[c])return!0;return!1}function T(){};var Ha=Error.captureStackTrace,V=function(a,b){this.code=a;this.message=b;if(Ha)Ha(this,U.prototype.create);else{var c=Error.apply(this,arguments);this.name="FirebaseError";Object.defineProperty(this,"stack",{get:function(){return c.stack}})}};V.prototype=Object.create(Error.prototype);V.prototype.constructor=V;V.prototype.name="FirebaseError";var U=function(a,b,c){this.$=a;this.aa=b;this.U=c;this.pattern=/\{\$([^}]+)}/g};
27
- U.prototype.create=function(a,b){void 0===b&&(b={});var c=this.U[a];a=this.$+"/"+a;var c=void 0===c?"Error":c.replace(this.pattern,function(a,c){a=b[c];return void 0!==a?a.toString():"<"+c+"?>"}),c=this.aa+": "+c+" ("+a+").",c=new V(a,c),d;for(d in b)b.hasOwnProperty(d)&&"_"!==d.slice(-1)&&(c[d]=b[d]);return c};var W=Q,X=function(a,b,c){var d=this;this.M=c;this.N=!1;this.c={};this.D=b;this.H=P(void 0,a);a="serviceAccount"in this.H;("credential"in this.H||a)&&"undefined"!==typeof console&&console.log("The '"+(a?"serviceAccount":"credential")+"' property specified in the first argument to initializeApp() is deprecated and will be removed in the next major version. You should instead use the 'firebase-admin' package. See https://firebase.google.com/docs/admin/setup for details on how to get started.");Object.keys(c.INTERNAL.factories).forEach(function(a){var b=
28
- c.INTERNAL.useAsService(d,a);null!==b&&(b=d.X.bind(d,b),d[a]=b)})};X.prototype.delete=function(){var a=this;return(new W(function(b){Y(a);b()})).then(function(){a.M.INTERNAL.removeApp(a.D);var b=[];Object.keys(a.c).forEach(function(c){Object.keys(a.c[c]).forEach(function(d){b.push(a.c[c][d])})});return W.all(b.map(function(a){return a.INTERNAL.delete()}))}).then(function(){a.N=!0;a.c={}})};
29
- X.prototype.X=function(a,b){Y(this);"undefined"===typeof this.c[a]&&(this.c[a]={});var c=b||"[DEFAULT]";return"undefined"===typeof this.c[a][c]?(b=this.M.INTERNAL.factories[a](this,this.W.bind(this),b),this.c[a][c]=b):this.c[a][c]};X.prototype.W=function(a){P(this,a)};var Y=function(a){a.N&&Z("app-deleted",{name:a.D})};k.Object.defineProperties(X.prototype,{name:{configurable:!0,enumerable:!0,get:function(){Y(this);return this.D}},options:{configurable:!0,enumerable:!0,get:function(){Y(this);return this.H}}});
30
- X.prototype.name&&X.prototype.options||X.prototype.delete||console.log("dc");
31
- function Ia(){function a(a){a=a||"[DEFAULT]";var b=d[a];void 0===b&&Z("no-app",{name:a});return b}function b(a,b){Object.keys(e).forEach(function(d){d=c(a,d);if(null!==d&&h[d])h[d](b,a)})}function c(a,b){if("serverAuth"===b)return null;var c=b;a=a.options;"auth"===b&&(a.serviceAccount||a.credential)&&(c="serverAuth","serverAuth"in e||Z("sa-not-supported"));return c}var d={},e={},h={},g={__esModule:!0,initializeApp:function(a,c){void 0===c?c="[DEFAULT]":"string"===typeof c&&""!==c||Z("bad-app-name",
32
- {name:c+""});void 0!==d[c]&&Z("duplicate-app",{name:c});a=new X(a,c,g);d[c]=a;b(a,"create");void 0!=a.INTERNAL&&void 0!=a.INTERNAL.getToken||P(a,{INTERNAL:{getUid:function(){return null},getToken:function(){return W.resolve(null)},addAuthTokenListener:function(){},removeAuthTokenListener:function(){}}});return a},app:a,apps:null,Promise:W,SDK_VERSION:"0.0.0",INTERNAL:{registerService:function(b,c,d,u){e[b]&&Z("duplicate-service",{name:b});e[b]=c;u&&(h[b]=u);c=function(c){void 0===c&&(c=a());return c[b]()};
33
- void 0!==d&&P(c,d);return g[b]=c},createFirebaseNamespace:Ia,extendNamespace:function(a){P(g,a)},createSubscribe:Ea,ErrorFactory:U,removeApp:function(a){b(d[a],"delete");delete d[a]},factories:e,useAsService:c,Promise:O,deepExtend:P}};g["default"]=g;Object.defineProperty(g,"apps",{get:function(){return Object.keys(d).map(function(a){return d[a]})}});a.App=X;return g}function Z(a,b){throw Ja.create(a,b);}
34
- var Ja=new U("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain"});"undefined"!==typeof firebase&&(firebase=Ia()); }).call(this);
35
- firebase.SDK_VERSION = "3.7.1";
1
+ /*! @license Firebase v4.2.0
2
+ Build: rev-d6b2db4
3
+ Terms: https://firebase.google.com/terms/ */
4
+
5
+ var firebase=function(){var e=void 0===e?self:e;return function(t){function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var r=e.webpackJsonpFirebase;e.webpackJsonpFirebase=function(e,o,c){for(var s,a,u,f=0,l=[];f<e.length;f++)a=e[f],i[a]&&l.push(i[a][0]),i[a]=0;for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s]);for(r&&r(e,o,c);l.length;)l.shift()();if(c)for(f=0;f<c.length;f++)u=n(n.s=c[f]);return u};var o={},i={3:0};return n.e=function(e){function t(){s.onerror=s.onload=null,clearTimeout(a);var t=i[e];0!==t&&(t&&t[1](Error("Loading chunk "+e+" failed.")),i[e]=void 0)}var r=i[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var o=new Promise(function(t,n){r=i[e]=[t,n]});r[2]=o;var c=document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript",s.charset="utf-8",s.async=!0,s.timeout=12e4,n.nc&&s.setAttribute("nonce",n.nc),s.src=n.p+""+e+".js";var a=setTimeout(t,12e4);return s.onerror=s.onload=t,c.appendChild(s),o},n.m=t,n.c=o,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.t?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n.oe=function(e){throw console.error(e),e},n(n.s=5)}([,,,,function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return c});var r=n(14),o=r.a.Promise||n(20),i=function(){function e(){var e=this;this.resolve=null,this.reject=null,this.promise=new o(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){function t(t,r){t?n.reject(t):n.resolve(r),"function"==typeof e&&(c(n.promise),1===e.length?e(t):e(t,r))}var n=this;return t},e}(),c=function(e){e.catch(function(){})}},function(e,t,n){"use strict";function r(){function e(e){v(y[e],"delete"),delete y[e]}function t(e){return e=e||f,u(y,e)||o("no-app",{name:e}),y[e]}function n(e,t){void 0===t?t=f:"string"==typeof t&&""!==t||o("bad-app-name",{name:t+""}),u(y,t)&&o("duplicate-app",{name:t});var n=new p(e,t,g);return y[t]=n,v(n,"create"),n}function l(){return Object.keys(y).map(function(e){return y[e]})}function h(e,n,r,i,c){b[e]&&o("duplicate-service",{name:e}),b[e]=n,i&&(_[e]=i,l().forEach(function(e){i("create",e)}));var s=function(n){return void 0===n&&(n=t()),"function"!=typeof n[e]&&o("invalid-app-argument",{name:e}),n[e]()};return void 0!==r&&Object(a.b)(s,r),g[e]=s,p.prototype[e]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this.r.bind(this,e).apply(this,c?t:[])},s}function d(e){Object(a.b)(g,e)}function v(e,t){Object.keys(b).forEach(function(n){var r=m(e,n);null!==r&&_[r]&&_[r](t,e)})}function m(e,t){if("serverAuth"===t)return null;var n=t;return e.options,n}var y={},b={},_={},g={t:!0,initializeApp:n,app:t,apps:null,Promise:s.b,SDK_VERSION:"4.2.0",INTERNAL:{registerService:h,createFirebaseNamespace:r,extendNamespace:d,createSubscribe:i.a,ErrorFactory:c.a,removeApp:e,factories:b,useAsService:m,Promise:s.b,deepExtend:a.b}};return Object(a.c)(g,"default",g),Object.defineProperty(g,"apps",{get:l}),Object(a.c)(t,"App",p),g}function o(e,t){throw d.create(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),c=n(10),s=n(4),a=n(17),u=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f="[DEFAULT]",l=[],p=function(){function e(e,t,n){this.u=n,this.f=!1,this.h={},this.v=t,this.y=Object(a.a)(e),this.INTERNAL={getUid:function(){return null},getToken:function(){return s.b.resolve(null)},addAuthTokenListener:function(e){l.push(e),setTimeout(function(){return e(null)},0)},removeAuthTokenListener:function(e){l=l.filter(function(t){return t!==e})}}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._(),this.v},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._(),this.y},enumerable:!0,configurable:!0}),e.prototype.delete=function(){var e=this;return new s.b(function(t){e._(),t()}).then(function(){e.u.INTERNAL.removeApp(e.v);var t=[];return Object.keys(e.h).forEach(function(n){Object.keys(e.h[n]).forEach(function(r){t.push(e.h[n][r])})}),s.b.all(t.map(function(e){return e.INTERNAL.delete()}))}).then(function(){e.f=!0,e.h={}})},e.prototype.r=function(e,t){if(void 0===t&&(t=f),this._(),this.h[e]||(this.h[e]={}),!this.h[e][t]){var n=t!==f?t:void 0,r=this.u.INTERNAL.factories[e](this,this.extendApp.bind(this),n);this.h[e][t]=r}return this.h[e][t]},e.prototype.extendApp=function(e){var t=this;Object(a.b)(this,e),e.INTERNAL&&e.INTERNAL.addAuthTokenListener&&(l.forEach(function(e){t.INTERNAL.addAuthTokenListener(e)}),l=[])},e.prototype._=function(){this.f&&o("app-deleted",{name:this.v})},e}();p.prototype.name&&p.prototype.options||p.prototype.delete||console.log("dc");var h={"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."},d=new c.a("app","Firebase",h),v=n(19),m=(n.n(v),r());t.default=m},,,,,function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r="FirebaseError",o=Error.captureStackTrace,i=function(){function e(e,t){if(this.code=e,this.message=t,o)o(this,c.prototype.create);else{var n=Error.apply(this,arguments);this.name=r,Object.defineProperty(this,"stack",{get:function(){return n.stack}})}}return e}();i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.name=r;var c=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n,r=this.errors[e],o=this.service+"/"+e;n=void 0===r?"Error":r.replace(this.pattern,function(e,n){var r=t[n];return void 0!==r?""+r:"<"+n+"?>"}),n=this.serviceName+": "+n+" ("+o+").";var c=new i(o,n);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(c[s]=t[s]);return c},e}()},,,function(e,t,n){"use strict";function r(e,t){var n=new a(e,t);return n.subscribe.bind(n)}function o(e,t){if("object"!==(void 0===e?"undefined":s(e))||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o in e&&"function"==typeof e[o])return!0}return!1}function i(){}t.a=r;var c=n(4),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=c.b.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var r,c=this;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");r=o(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=i),void 0===r.error&&(r.error=i),void 0===r.complete&&(r.complete=i);var s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{c.finalError?r.error(c.finalError):r.complete()}catch(e){}}),this.observers.push(r),s},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},e}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return o});var r;if(void 0!==e)r=e;else if("undefined"!=typeof self)r=self;else try{r=Function("return this")()}catch(e){throw Error("polyfill failed because global object is unavailable in this environment")}var o=r}).call(t,n(15))},function(t,n){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof e&&(r=e)}t.exports=r},function(e,t){function n(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function c(){v&&h&&(v=!1,h.length?d=h.concat(d):m=-1,d.length&&s())}function s(){if(!v){var e=o(c);v=!0;for(var t=d.length;t;){for(h=d,d=[];++m<t;)h&&h[m].run();m=-1,t=d.length}h=null,v=!1,i(e)}}function a(e,t){this.fun=e,this.array=t}function u(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var h,d=[],v=!1,m=-1;p.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new a(e,t)),1!==d.length||v||o(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(e){return[]},p.binding=function(e){throw Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){"use strict";function r(e){return o(void 0,e)}function o(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:var n=t;return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)t.hasOwnProperty(r)&&(e[r]=o(e[r],t[r]));return e}function i(e,t,n){e[t]=n}t.a=r,t.b=o,t.c=i},,function(e,t){Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var i=t[o];if(e.call(r,i,o,t))return o;o++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var i=t[o];if(e.call(r,i,o,t))return i;o++}}})},function(e,t,n){(function(t){!function(n){function r(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this.g=0,this.T=!1,this.w=void 0,this.O=[],l(e,this)}function c(e,t){for(;3===e.g;)e=e.w;if(0===e.g)return void e.O.push(t);e.T=!0,i.j(function(){var n=1===e.g?t.onFulfilled:t.onRejected;if(null===n)return void(1===e.g?s:a)(t.promise,e.w);var r;try{r=n(e.w)}catch(e){return void a(t.promise,e)}s(t.promise,r)})}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e.g=3,e.w=t,void u(e);if("function"==typeof n)return void l(o(n,t),e)}e.g=1,e.w=t,u(e)}catch(t){a(e,t)}}function a(e,t){e.g=2,e.w=t,u(e)}function u(e){2===e.g&&0===e.O.length&&i.j(function(){e.T||i.A(e.w)});for(var t=0,n=e.O.length;t<n;t++)c(e,e.O[t]);e.O=null}function f(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,a(t,e))})}catch(e){if(n)return;n=!0,a(t,e)}}var p=setTimeout;i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return c(this,new f(e,t,n)),n},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(i,c){try{if(c&&("object"==typeof c||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,function(e){r(i,e)},n)}t[i]=c,0==--o&&e(t)}catch(e){n(e)}}if(0===t.length)return e([]);for(var o=t.length,i=0;i<t.length;i++)r(i,t[i])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var r=0,o=e.length;r<o;r++)e[r].then(t,n)})},i.j="function"==typeof t&&function(e){t(e)}||function(e){p(e,0)},i.A=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i.k=function(e){i.j=e},i.I=function(e){i.A=e},void 0!==e&&e.exports?e.exports=i:n.Promise||(n.Promise=i)}(this)}).call(t,n(21).setImmediate)},function(t,n,r){function o(e,t){this.F=e,this.N=t}var i=Function.prototype.apply;n.setTimeout=function(){return new o(i.call(setTimeout,e,arguments),clearTimeout)},n.setInterval=function(){return new o(i.call(setInterval,e,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this.N.call(e,this.F)},n.enroll=function(e,t){clearTimeout(e.x),e.P=t},n.unenroll=function(e){clearTimeout(e.x),e.P=-1},n.L=n.active=function(e){clearTimeout(e.x);var t=e.P;t>=0&&(e.x=setTimeout(function(){e.S&&e.S()},t))},r(22),n.setImmediate=setImmediate,n.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=Function(""+e));for(var t=Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[a]=r,s(a),a++}function o(e){delete u[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function c(e){if(f)setTimeout(c,0,e);else{var t=u[e];if(t){f=!0;try{i(t)}finally{o(e),f=!1}}}}if(!e.setImmediate){var s,a=1,u={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){c(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&c(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){c(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var e=l.documentElement;s=function(t){var n=l.createElement("script");n.onreadystatechange=function(){c(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(c,0,e)}}(),p.setImmediate=r,p.clearImmediate=o}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(15),n(16))}])}().default;
@@ -1,6 +1,25 @@
1
+ /*! @license Firebase v4.2.0
2
+ Build: rev-d6b2db4
3
+ Terms: https://firebase.google.com/terms/ */
4
+
5
+ /**
6
+ * Copyright 2017 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
1
20
  /**
2
21
  * @fileoverview Firebase Auth API.
3
- * Version: 3.7.1
22
+ * Version: 4.2.0
4
23
  *
5
24
  * Copyright 2017 Google Inc. All Rights Reserved.
6
25
  *
@@ -58,7 +77,7 @@ firebase.auth.AuthCredential = function() {};
58
77
  *
59
78
  * @type {string}
60
79
  */
61
- firebase.auth.AuthCredential.prototype.provider;
80
+ firebase.auth.AuthCredential.prototype.providerId;
62
81
 
63
82
  /**
64
83
  * Gets the {@link firebase.auth.Auth `Auth`} service for the current app.
@@ -115,6 +134,13 @@ firebase.UserInfo.prototype.displayName;
115
134
  */
116
135
  firebase.UserInfo.prototype.photoURL;
117
136
 
137
+ /**
138
+ * The user's E.164 formatted phone number (if available).
139
+ *
140
+ * @type {?string}
141
+ */
142
+ firebase.UserInfo.prototype.phoneNumber;
143
+
118
144
  /**
119
145
  * A user account.
120
146
  *
@@ -123,6 +149,14 @@ firebase.UserInfo.prototype.photoURL;
123
149
  */
124
150
  firebase.User;
125
151
 
152
+ /**
153
+ * The phone number normalized based on the E.164 standard (e.g. +16505550101)
154
+ * for the current user. This is null if the user has no phone credential linked
155
+ * to the account.
156
+ * @type {?string}
157
+ */
158
+ firebase.User.prototype.phoneNumber;
159
+
126
160
  /** @type {boolean} */
127
161
  firebase.User.prototype.isAnonymous;
128
162
 
@@ -151,12 +185,27 @@ firebase.User.prototype.refreshToken;
151
185
  * Returns the current token if it has not expired, otherwise this will
152
186
  * refresh the token and return a new one.
153
187
  *
188
+ * This property is deprecated. Use {@link firebase.User#getIdToken} instead.
189
+ *
154
190
  * @param {boolean=} forceRefresh Force refresh regardless of token
155
191
  * expiration.
156
192
  * @return {!firebase.Promise<string>}
193
+ * @deprecated
157
194
  */
158
195
  firebase.User.prototype.getToken = function(forceRefresh) {};
159
196
 
197
+ /**
198
+ * Returns a JWT token used to identify the user to a Firebase service.
199
+ *
200
+ * Returns the current token if it has not expired, otherwise this will
201
+ * refresh the token and return a new one.
202
+ *
203
+ * @param {boolean=} forceRefresh Force refresh regardless of token
204
+ * expiration.
205
+ * @return {!firebase.Promise<string>}
206
+ */
207
+ firebase.User.prototype.getIdToken = function(forceRefresh) {};
208
+
160
209
  /**
161
210
  * Refreshes the current user, if signed in.
162
211
  *
@@ -187,9 +236,8 @@ firebase.User.prototype.sendEmailVerification = function() {};
187
236
  * <dt>auth/invalid-credential</dt>
188
237
  * <dd>Thrown if the provider's credential is not valid. This can happen if it
189
238
  * has already expired when calling link, or if it used invalid token(s).
190
- * Please refer to the Guide, under the provider's section you tried to
191
- * link, and make sure you pass in the correct parameter to the credential
192
- * method.</dd>
239
+ * See the Firebase documentation for your provider, and make sure you pass
240
+ * in the correct parameters to the credential method.</dd>
193
241
  * <dt>auth/credential-already-in-use</dt>
194
242
  * <dd>Thrown if the account corresponding to the credential already exists
195
243
  * among your users, or is already linked to a Firebase User.
@@ -197,10 +245,11 @@ firebase.User.prototype.sendEmailVerification = function() {};
197
245
  * user to a Google user by linking a Google credential to it and the Google
198
246
  * credential used is already associated with an existing Firebase Google
199
247
  * user.
200
- * An <code>error.email</code> and <code>error.credential</code>
201
- * ({@link firebase.auth.AuthCredential}) fields are also provided. You can
202
- * recover from this error by signing in with that credential directly via
203
- * {@link firebase.auth.Auth#signInWithCredential}.</dd>
248
+ * The fields <code>error.email</code>, <code>error.phoneNumber</code>, and
249
+ * <code>error.credential</code> ({@link firebase.auth.AuthCredential})
250
+ * may be provided, depending on the type of credential. You can recover
251
+ * from this error by signing in with <code>error.credential</code> directly
252
+ * via {@link firebase.auth.Auth#signInWithCredential}.</dd>
204
253
  * <dt>auth/email-already-in-use</dt>
205
254
  * <dd>Thrown if the email corresponding to the credential already exists
206
255
  * among your users. When thrown while linking a credential to an existing
@@ -210,8 +259,8 @@ firebase.User.prototype.sendEmailVerification = function() {};
210
259
  * you wish to continue signing in with that credential. To do so, call
211
260
  * {@link firebase.auth.Auth#fetchProvidersForEmail}, sign in to
212
261
  * <code>error.email</code> via one of the providers returned and then
213
- * {@link firebase.User#link} the original credential to that newly signed
214
- * in user.</dd>
262
+ * {@link firebase.User#linkWithCredential} the original credential to that
263
+ * newly signed in user.</dd>
215
264
  * <dt>auth/operation-not-allowed</dt>
216
265
  * <dd>Thrown if you have not enabled the provider in the Firebase Console. Go
217
266
  * to the Firebase Console for your project, in the Auth section and the
@@ -221,14 +270,133 @@ firebase.User.prototype.sendEmailVerification = function() {};
221
270
  * {@link firebase.auth.EmailAuthProvider#credential} is invalid.</dd>
222
271
  * <dt>auth/wrong-password</dt>
223
272
  * <dd>Thrown if the password used in a
224
- * {@link firebase.auth.EmailAuthProvider#credential} is not correct or when
225
- * the user associated with the email does not have a password.</dd>
273
+ * {@link firebase.auth.EmailAuthProvider#credential} is not correct or
274
+ * when the user associated with the email does not have a password.</dd>
275
+ * <dt>auth/invalid-verification-code</dt>
276
+ * <dd>Thrown if the credential is a
277
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
278
+ * code of the credential is not valid.</dd>
279
+ * <dt>auth/invalid-verification-id</dt>
280
+ * <dd>Thrown if the credential is a
281
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
282
+ * ID of the credential is not valid.</dd>
226
283
  * </dl>
227
284
  *
228
285
  * @param {!firebase.auth.AuthCredential} credential The auth credential.
229
286
  * @return {!firebase.Promise<!firebase.User>}
230
287
  */
231
- firebase.User.prototype.link = function(credential) {};
288
+ firebase.User.prototype.linkWithCredential = function(credential) {};
289
+
290
+
291
+ /**
292
+ * Links the user account with the given credentials, and returns any available
293
+ * additional user information, such as user name.
294
+ *
295
+ * <h4>Error Codes</h4>
296
+ * <dl>
297
+ * <dt>auth/provider-already-linked</dt>
298
+ * <dd>Thrown if the provider has already been linked to the user. This error is
299
+ * thrown even if this is not the same provider's account that is currently
300
+ * linked to the user.</dd>
301
+ * <dt>auth/invalid-credential</dt>
302
+ * <dd>Thrown if the provider's credential is not valid. This can happen if it
303
+ * has already expired when calling link, or if it used invalid token(s).
304
+ * See the Firebase documentation for your provider, and make sure you pass
305
+ * in the correct parameters to the credential method.</dd>
306
+ * <dt>auth/credential-already-in-use</dt>
307
+ * <dd>Thrown if the account corresponding to the credential already exists
308
+ * among your users, or is already linked to a Firebase User.
309
+ * For example, this error could be thrown if you are upgrading an anonymous
310
+ * user to a Google user by linking a Google credential to it and the Google
311
+ * credential used is already associated with an existing Firebase Google
312
+ * user.
313
+ * The fields <code>error.email</code>, <code>error.phoneNumber</code>, and
314
+ * <code>error.credential</code> ({@link firebase.auth.AuthCredential})
315
+ * may be provided, depending on the type of credential. You can recover
316
+ * from this error by signing in with <code>error.credential</code> directly
317
+ * via {@link firebase.auth.Auth#signInWithCredential}.</dd>
318
+ * <dt>auth/email-already-in-use</dt>
319
+ * <dd>Thrown if the email corresponding to the credential already exists
320
+ * among your users. When thrown while linking a credential to an existing
321
+ * user, an <code>error.email</code> and <code>error.credential</code>
322
+ * ({@link firebase.auth.AuthCredential}) fields are also provided.
323
+ * You have to link the credential to the existing user with that email if
324
+ * you wish to continue signing in with that credential. To do so, call
325
+ * {@link firebase.auth.Auth#fetchProvidersForEmail}, sign in to
326
+ * <code>error.email</code> via one of the providers returned and then
327
+ * {@link firebase.User#linkWithCredential} the original credential to that
328
+ * newly signed in user.</dd>
329
+ * <dt>auth/operation-not-allowed</dt>
330
+ * <dd>Thrown if you have not enabled the provider in the Firebase Console. Go
331
+ * to the Firebase Console for your project, in the Auth section and the
332
+ * <strong>Sign in Method</strong> tab and configure the provider.</dd>
333
+ * <dt>auth/invalid-email</dt>
334
+ * <dd>Thrown if the email used in a
335
+ * {@link firebase.auth.EmailAuthProvider#credential} is invalid.</dd>
336
+ * <dt>auth/wrong-password</dt>
337
+ * <dd>Thrown if the password used in a
338
+ * {@link firebase.auth.EmailAuthProvider#credential} is not correct or
339
+ * when the user associated with the email does not have a password.</dd>
340
+ * <dt>auth/invalid-verification-code</dt>
341
+ * <dd>Thrown if the credential is a
342
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
343
+ * code of the credential is not valid.</dd>
344
+ * <dt>auth/invalid-verification-id</dt>
345
+ * <dd>Thrown if the credential is a
346
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
347
+ * ID of the credential is not valid.</dd>
348
+ * </dl>
349
+ *
350
+ * @param {!firebase.auth.AuthCredential} credential The auth credential.
351
+ * @return {!firebase.Promise<!firebase.auth.UserCredential>}
352
+ */
353
+ firebase.User.prototype.linkAndRetrieveDataWithCredential =
354
+ function(credential) {};
355
+
356
+
357
+ /**
358
+ * Links the user account with the given phone number.
359
+ *
360
+ * <h4>Error Codes</h4>
361
+ * <dl>
362
+ * <dt>auth/provider-already-linked</dt>
363
+ * <dd>Thrown if the provider has already been linked to the user. This error is
364
+ * thrown even if this is not the same provider's account that is currently
365
+ * linked to the user.</dd>
366
+ * <dt>auth/captcha-check-failed</dt>
367
+ * <dd>Thrown if the reCAPTCHA response token was invalid, expired, or if
368
+ * this method was called from a non-whitelisted domain.</dd>
369
+ * <dt>auth/invalid-phone-number</dt>
370
+ * <dd>Thrown if the phone number has an invalid format.</dd>
371
+ * <dt>auth/missing-phone-number</dt>
372
+ * <dd>Thrown if the phone number is missing.</dd>
373
+ * <dt>auth/quota-exceeded</dt>
374
+ * <dd>Thrown if the SMS quota for the Firebase project has been exceeded.</dd>
375
+ * <dt>auth/user-disabled</dt>
376
+ * <dd>Thrown if the user corresponding to the given phone number has been
377
+ * disabled.</dd>
378
+ * <dt>auth/credential-already-in-use</dt>
379
+ * <dd>Thrown if the account corresponding to the phone number already exists
380
+ * among your users, or is already linked to a Firebase User.
381
+ * The fields <code>error.phoneNumber</code> and
382
+ * <code>error.credential</code> ({@link firebase.auth.AuthCredential})
383
+ * are provided in this case. You can recover from this error by signing in
384
+ * with that credential directly via
385
+ * {@link firebase.auth.Auth#signInWithCredential}.</dd>
386
+ * <dt>auth/operation-not-allowed</dt>
387
+ * <dd>Thrown if you have not enabled the phone authentication provider in the
388
+ * Firebase Console. Go to the Firebase Console for your project, in the
389
+ * Auth section and the <strong>Sign in Method</strong> tab and configure
390
+ * the provider.</dd>
391
+ * </dl>
392
+ *
393
+ * @param {string} phoneNumber The user's phone number in E.164 format (e.g.
394
+ * +16505550101).
395
+ * @param {!firebase.auth.ApplicationVerifier} applicationVerifier
396
+ * @return {!firebase.Promise<!firebase.auth.ConfirmationResult>}
397
+ */
398
+ firebase.User.prototype.linkWithPhoneNumber =
399
+ function(phoneNumber, applicationVerifier) {};
232
400
 
233
401
 
234
402
  /**
@@ -262,9 +430,8 @@ firebase.User.prototype.unlink = function(providerId) {};
262
430
  * <dt>auth/invalid-credential</dt>
263
431
  * <dd>Thrown if the provider's credential is not valid. This can happen if it
264
432
  * has already expired when calling link, or if it used invalid token(s).
265
- * Please refer to the Guide, under the provider's section you tried to
266
- * link, and make sure you pass in the correct parameter to the credential
267
- * method.</dd>
433
+ * See the Firebase documentation for your provider, and make sure you pass
434
+ * in the correct parameters to the credential method.</dd>
268
435
  * <dt>auth/invalid-email</dt>
269
436
  * <dd>Thrown if the email used in a
270
437
  * {@link firebase.auth.EmailAuthProvider#credential} is invalid.</dd>
@@ -272,12 +439,94 @@ firebase.User.prototype.unlink = function(providerId) {};
272
439
  * <dd>Thrown if the password used in a
273
440
  * {@link firebase.auth.EmailAuthProvider#credential} is not correct or when
274
441
  * the user associated with the email does not have a password.</dd>
442
+ * <dt>auth/invalid-verification-code</dt>
443
+ * <dd>Thrown if the credential is a
444
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
445
+ * code of the credential is not valid.</dd>
446
+ * <dt>auth/invalid-verification-id</dt>
447
+ * <dd>Thrown if the credential is a
448
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
449
+ * ID of the credential is not valid.</dd>
275
450
  * </dl>
276
451
  *
277
452
  * @param {!firebase.auth.AuthCredential} credential
278
453
  * @return {!firebase.Promise<void>}
279
454
  */
280
- firebase.User.prototype.reauthenticate = function(credential) {};
455
+ firebase.User.prototype.reauthenticateWithCredential = function(credential) {};
456
+
457
+
458
+ /**
459
+ * Re-authenticates a user using a fresh credential, and returns any available
460
+ * additional user information, such as user name. Use before operations
461
+ * such as {@link firebase.User#updatePassword} that require tokens from recent
462
+ * sign-in attempts.
463
+ *
464
+ * <h4>Error Codes</h4>
465
+ * <dl>
466
+ * <dt>auth/user-mismatch</dt>
467
+ * <dd>Thrown if the credential given does not correspond to the user.</dd>
468
+ * <dt>auth/user-not-found</dt>
469
+ * <dd>Thrown if the credential given does not correspond to any existing user.
470
+ * </dd>
471
+ * <dt>auth/invalid-credential</dt>
472
+ * <dd>Thrown if the provider's credential is not valid. This can happen if it
473
+ * has already expired when calling link, or if it used invalid token(s).
474
+ * See the Firebase documentation for your provider, and make sure you pass
475
+ * in the correct parameters to the credential method.</dd>
476
+ * <dt>auth/invalid-email</dt>
477
+ * <dd>Thrown if the email used in a
478
+ * {@link firebase.auth.EmailAuthProvider#credential} is invalid.</dd>
479
+ * <dt>auth/wrong-password</dt>
480
+ * <dd>Thrown if the password used in a
481
+ * {@link firebase.auth.EmailAuthProvider#credential} is not correct or when
482
+ * the user associated with the email does not have a password.</dd>
483
+ * <dt>auth/invalid-verification-code</dt>
484
+ * <dd>Thrown if the credential is a
485
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
486
+ * code of the credential is not valid.</dd>
487
+ * <dt>auth/invalid-verification-id</dt>
488
+ * <dd>Thrown if the credential is a
489
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
490
+ * ID of the credential is not valid.</dd>
491
+ * </dl>
492
+ *
493
+ * @param {!firebase.auth.AuthCredential} credential
494
+ * @return {!firebase.Promise<!firebase.auth.UserCredential>}
495
+ */
496
+ firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential =
497
+ function(credential) {};
498
+
499
+
500
+ /**
501
+ * Re-authenticates a user using a fresh credential. Use before operations
502
+ * such as {@link firebase.User#updatePassword} that require tokens from recent
503
+ * sign-in attempts.
504
+ *
505
+ * <h4>Error Codes</h4>
506
+ * <dl>
507
+ * <dt>auth/user-mismatch</dt>
508
+ * <dd>Thrown if the credential given does not correspond to the user.</dd>
509
+ * <dt>auth/user-not-found</dt>
510
+ * <dd>Thrown if the credential given does not correspond to any existing user.
511
+ * </dd>
512
+ * <dt>auth/captcha-check-failed</dt>
513
+ * <dd>Thrown if the reCAPTCHA response token was invalid, expired, or if
514
+ * this method was called from a non-whitelisted domain.</dd>
515
+ * <dt>auth/invalid-phone-number</dt>
516
+ * <dd>Thrown if the phone number has an invalid format.</dd>
517
+ * <dt>auth/missing-phone-number</dt>
518
+ * <dd>Thrown if the phone number is missing.</dd>
519
+ * <dt>auth/quota-exceeded</dt>
520
+ * <dd>Thrown if the SMS quota for the Firebase project has been exceeded.</dd>
521
+ * </dl>
522
+ *
523
+ * @param {string} phoneNumber The user's phone number in E.164 format (e.g.
524
+ * +16505550101).
525
+ * @param {!firebase.auth.ApplicationVerifier} applicationVerifier
526
+ * @return {!firebase.Promise<!firebase.auth.ConfirmationResult>}
527
+ */
528
+ firebase.User.prototype.reauthenticateWithPhoneNumber =
529
+ function(phoneNumber, applicationVerifier) {};
281
530
 
282
531
 
283
532
  /**
@@ -289,7 +538,8 @@ firebase.User.prototype.reauthenticate = function(credential) {};
289
538
  *
290
539
  * <b>Important:</b> this is a security sensitive operation that requires the
291
540
  * user to have recently signed in. If this requirement isn't met, ask the user
292
- * to authenticate again and then call {@link firebase.User#reauthenticate}.
541
+ * to authenticate again and then call
542
+ * {@link firebase.User#reauthenticateWithCredential}.
293
543
  *
294
544
  * <h4>Error Codes</h4>
295
545
  * <dl>
@@ -299,8 +549,8 @@ firebase.User.prototype.reauthenticate = function(credential) {};
299
549
  * <dd>Thrown if the email is already used by another user.</dd>
300
550
  * <dt>auth/requires-recent-login</dt>
301
551
  * <dd>Thrown if the user's last sign-in time does not meet the security
302
- * threshold. Use {@link firebase.User#reauthenticate} to resolve. This does
303
- * not apply if the user is anonymous.</dd>
552
+ * threshold. Use {@link firebase.User#reauthenticateWithCredential} to
553
+ * resolve. This does not apply if the user is anonymous.</dd>
304
554
  * </dl>
305
555
  *
306
556
  * @param {string} newEmail The new email address.
@@ -314,7 +564,8 @@ firebase.User.prototype.updateEmail = function(newEmail) {};
314
564
  *
315
565
  * <b>Important:</b> this is a security sensitive operation that requires the
316
566
  * user to have recently signed in. If this requirement isn't met, ask the user
317
- * to authenticate again and then call {@link firebase.User#reauthenticate}.
567
+ * to authenticate again and then call
568
+ * {@link firebase.User#reauthenticateWithCredential}.
318
569
  *
319
570
  * <h4>Error Codes</h4>
320
571
  * <dl>
@@ -322,8 +573,8 @@ firebase.User.prototype.updateEmail = function(newEmail) {};
322
573
  * <dd>Thrown if the password is not strong enough.</dd>
323
574
  * <dt>auth/requires-recent-login</dt>
324
575
  * <dd>Thrown if the user's last sign-in time does not meet the security
325
- * threshold. Use {@link firebase.User#reauthenticate} to resolve. This does
326
- * not apply if the user is anonymous.</dd>
576
+ * threshold. Use {@link firebase.User#reauthenticateWithCredential} to
577
+ * resolve. This does not apply if the user is anonymous.</dd>
327
578
  * </dl>
328
579
  *
329
580
  * @param {string} newPassword
@@ -332,6 +583,23 @@ firebase.User.prototype.updateEmail = function(newEmail) {};
332
583
  firebase.User.prototype.updatePassword = function(newPassword) {};
333
584
 
334
585
 
586
+ /**
587
+ * Updates the user's phone number.
588
+ *
589
+ * <h4>Error Codes</h4>
590
+ * <dl>
591
+ * <dt>auth/invalid-verification-code</dt>
592
+ * <dd>Thrown if the verification code of the credential is not valid.</dd>
593
+ * <dt>auth/invalid-verification-id</dt>
594
+ * <dd>Thrown if the verification ID of the credential is not valid.</dd>
595
+ * </dl>
596
+ *
597
+ * @param {!firebase.auth.AuthCredential} phoneCredential
598
+ * @return {!firebase.Promise<void>}
599
+ */
600
+ firebase.User.prototype.updatePhoneNumber = function(phoneCredential) {};
601
+
602
+
335
603
  /**
336
604
  * Updates a user's profile data.
337
605
  *
@@ -375,14 +643,15 @@ firebase.User.prototype.updateProfile = function(profile) {};
375
643
  *
376
644
  * <b>Important:</b> this is a security sensitive operation that requires the
377
645
  * user to have recently signed in. If this requirement isn't met, ask the user
378
- * to authenticate again and then call {@link firebase.User#reauthenticate}.
646
+ * to authenticate again and then call
647
+ * {@link firebase.User#reauthenticateWithCredential}.
379
648
  *
380
649
  * <h4>Error Codes</h4>
381
650
  * <dl>
382
651
  * <dt>auth/requires-recent-login</dt>
383
652
  * <dd>Thrown if the user's last sign-in time does not meet the security
384
- * threshold. Use {@link firebase.User#reauthenticate} to resolve. This does
385
- * not apply if the user is anonymous.</dd>
653
+ * threshold. Use {@link firebase.User#reauthenticateWithCredential} to
654
+ * resolve. This does not apply if the user is anonymous.</dd>
386
655
  * </dl>
387
656
  *
388
657
  * @return {!firebase.Promise<void>}
@@ -529,6 +798,69 @@ firebase.auth.Auth.prototype.app;
529
798
  */
530
799
  firebase.auth.Auth.prototype.currentUser;
531
800
 
801
+ /**
802
+ * @enum {string}
803
+ * An enumeration of the possible persistence mechanism types.
804
+ */
805
+ firebase.auth.Auth.Persistence = {
806
+ /**
807
+ * Indicates that the state will be persisted even when the browser window is
808
+ * closed or the activity is destroyed in react-native.
809
+ */
810
+ LOCAL: 'local',
811
+ /**
812
+ * Indicates that the state will only be stored in memory and will be cleared
813
+ * when the window or activity is refreshed.
814
+ */
815
+ NONE: 'none',
816
+ /**
817
+ * Indicates that the state will only persist in current session/tab, relevant
818
+ * to web only, and will be cleared when the tab is closed.
819
+ */
820
+ SESSION: 'session'
821
+ };
822
+
823
+ /**
824
+ * Changes the current type of persistence on the current Auth instance for the
825
+ * currently saved Auth session and applies this type of persistence for
826
+ * future sign-in requests, including sign-in with redirect requests. This will
827
+ * return a promise that will resolve once the state finishes copying from one
828
+ * type of storage to the other.
829
+ * Calling a sign-in method after changing persistence will wait for that
830
+ * persistence change to complete before applying it on the new Auth state.
831
+ *
832
+ * This makes it easy for a user signing in to specify whether their session
833
+ * should be remembered or not. It also makes it easier to never persist the
834
+ * Auth state for applications that are shared by other users or have sensitive
835
+ * data.
836
+ *
837
+ * The default for web browser apps and React Native apps is 'local' (provided
838
+ * the browser supports this mechanism) whereas it is 'none' for Node.js backend
839
+ * apps.
840
+ *
841
+ * <h4>Error Codes (thrown synchronously)</h4>
842
+ * <dl>
843
+ * <dt>auth/invalid-persistence-type</dt>
844
+ * <dd>Thrown if the specified persistence type is invalid.</dd>
845
+ * <dt>auth/unsupported-persistence-type</dt>
846
+ * <dd>Thrown if the current environment does not support the specified
847
+ * persistence type.</dd>
848
+ * </dl>
849
+ *
850
+ * @example
851
+ * firebase.auth().setPersistence(firebase.auth.Auth.Persistence.SESSION)
852
+ * .then(function() {
853
+ * // Existing and future Auth states are now persisted in the current
854
+ * // session only. Closing the window would clear any existing state even if
855
+ * // a user forgets to sign out.
856
+ * });
857
+ *
858
+ * @param {!firebase.auth.Auth.Persistence} persistence The auth state
859
+ * persistence mechanism.
860
+ * @return {!firebase.Promise<void>}
861
+ */
862
+ firebase.auth.Auth.prototype.setPersistence = function(persistence) {};
863
+
532
864
  /**
533
865
  * Creates a new user account associated with the specified email address and
534
866
  * password.
@@ -596,7 +928,14 @@ firebase.auth.Auth.prototype.fetchProvidersForEmail = function(email) {};
596
928
 
597
929
 
598
930
  /**
599
- * Adds an observer for auth state changes.
931
+ * Adds an observer for changes to the user's sign-in state.
932
+ *
933
+ * Prior to 4.0.0, this triggered the observer when users were signed in,
934
+ * signed out, or when the user's ID token changed in situations such as token
935
+ * expiry or password change. After 4.0.0, the observer is only triggered
936
+ * on sign-in or sign-out.
937
+ *
938
+ * To keep the old behavior, see {@link firebase.auth.Auth#onIdTokenChanged}.
600
939
  *
601
940
  * @example
602
941
  * firebase.auth().onAuthStateChanged(function(user) {
@@ -605,18 +944,42 @@ firebase.auth.Auth.prototype.fetchProvidersForEmail = function(email) {};
605
944
  * }
606
945
  * });
607
946
  *
608
- * @param {!Object|function(?firebase.User)}
947
+ * @param {!firebase.Observer<firebase.User, firebase.auth.Error>|function(?firebase.User)}
609
948
  * nextOrObserver An observer object or a function triggered on change.
610
949
  * @param {function(!firebase.auth.Error)=} error Optional A function
611
950
  * triggered on auth error.
612
- * @param {function()=} completed Optional A function triggered when the
951
+ * @param {firebase.CompleteFn=} completed Optional A function triggered when the
613
952
  * observer is removed.
614
- * @return {!function()} The unsubscribe function for the observer.
953
+ * @return {!firebase.Unsubscribe} The unsubscribe function for the observer.
615
954
  */
616
955
  firebase.auth.Auth.prototype.onAuthStateChanged = function(
617
956
  nextOrObserver, error, completed) {};
618
957
 
619
958
 
959
+ /**
960
+ * Adds an observer for changes to the signed-in user's ID token, which includes
961
+ * sign-in, sign-out, and token refresh events. This method has the same
962
+ * behavior as {@link firebase.auth.Auth#onAuthStateChanged} had prior to 4.0.0.
963
+ *
964
+ * @example
965
+ * firebase.auth().onIdTokenChanged(function(user) {
966
+ * if (user) {
967
+ * // User is signed in or token was refreshed.
968
+ * }
969
+ * });
970
+ *
971
+ * @param {!firebase.Observer<firebase.User, firebase.auth.Error>|function(?firebase.User)}
972
+ * nextOrObserver An observer object or a function triggered on change.
973
+ * @param {function(!firebase.auth.Error)=} error Optional A function
974
+ * triggered on auth error.
975
+ * @param {firebase.CompleteFn=} completed Optional A function triggered when the
976
+ * observer is removed.
977
+ * @return {!firebase.Unsubscribe} The unsubscribe function for the observer.
978
+ */
979
+ firebase.auth.Auth.prototype.onIdTokenChanged = function(
980
+ nextOrObserver, error, completed) {};
981
+
982
+
620
983
  /**
621
984
  * Sends a password reset email to the given email address.
622
985
  *
@@ -678,7 +1041,7 @@ firebase.auth.Auth.prototype.confirmPasswordReset =
678
1041
  * {@link firebase.auth.Auth#fetchProvidersForEmail} and then asking the
679
1042
  * user to sign in using one of the returned providers. Once the user is
680
1043
  * signed in, the original credential can be linked to the user with
681
- * {@link firebase.User#link}.</dd>
1044
+ * {@link firebase.User#linkWithCredential}.</dd>
682
1045
  * <dt>auth/invalid-credential</dt>
683
1046
  * <dd>Thrown if the credential is malformed or has expired.</dd>
684
1047
  * <dt>auth/operation-not-allowed</dt>
@@ -697,6 +1060,14 @@ firebase.auth.Auth.prototype.confirmPasswordReset =
697
1060
  * {@link firebase.auth.EmailAuthProvider#credential} and the password is
698
1061
  * invalid for the given email, or if the account corresponding to the email
699
1062
  * does not have a password set.</dd>
1063
+ * <dt>auth/invalid-verification-code</dt>
1064
+ * <dd>Thrown if the credential is a
1065
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
1066
+ * code of the credential is not valid.</dd>
1067
+ * <dt>auth/invalid-verification-id</dt>
1068
+ * <dd>Thrown if the credential is a
1069
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
1070
+ * ID of the credential is not valid.</dd>
700
1071
  * </dl>
701
1072
  *
702
1073
  * @example
@@ -721,6 +1092,59 @@ firebase.auth.Auth.prototype.confirmPasswordReset =
721
1092
  */
722
1093
  firebase.auth.Auth.prototype.signInWithCredential = function(credential) {};
723
1094
 
1095
+ /**
1096
+ * Asynchronously signs in with the given credentials, and returns any available
1097
+ * additional user information, such as user name.
1098
+ *
1099
+ * <h4>Error Codes</h4>
1100
+ * <dl>
1101
+ * <dt>auth/account-exists-with-different-credential</dt>
1102
+ * <dd>Thrown if there already exists an account with the email address
1103
+ * asserted by the credential. Resolve this by calling
1104
+ * {@link firebase.auth.Auth#fetchProvidersForEmail} and then asking the
1105
+ * user to sign in using one of the returned providers. Once the user is
1106
+ * signed in, the original credential can be linked to the user with
1107
+ * {@link firebase.User#linkWithCredential}.</dd>
1108
+ * <dt>auth/invalid-credential</dt>
1109
+ * <dd>Thrown if the credential is malformed or has expired.</dd>
1110
+ * <dt>auth/operation-not-allowed</dt>
1111
+ * <dd>Thrown if the type of account corresponding to the credential
1112
+ * is not enabled. Enable the account type in the Firebase Console, under
1113
+ * the Auth tab.</dd>
1114
+ * <dt>auth/user-disabled</dt>
1115
+ * <dd>Thrown if the user corresponding to the given credential has been
1116
+ * disabled.</dd>
1117
+ * <dt>auth/user-not-found</dt>
1118
+ * <dd>Thrown if signing in with a credential from
1119
+ * {@link firebase.auth.EmailAuthProvider#credential} and there is no user
1120
+ * corresponding to the given email. </dd>
1121
+ * <dt>auth/wrong-password</dt>
1122
+ * <dd>Thrown if signing in with a credential from
1123
+ * {@link firebase.auth.EmailAuthProvider#credential} and the password is
1124
+ * invalid for the given email, or if the account corresponding to the email
1125
+ * does not have a password set.</dd>
1126
+ * <dt>auth/invalid-verification-code</dt>
1127
+ * <dd>Thrown if the credential is a
1128
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
1129
+ * code of the credential is not valid.</dd>
1130
+ * <dt>auth/invalid-verification-id</dt>
1131
+ * <dd>Thrown if the credential is a
1132
+ * {@link firebase.auth.PhoneAuthProvider#credential} and the verification
1133
+ * ID of the credential is not valid.</dd>
1134
+ * </dl>
1135
+ *
1136
+ * @example
1137
+ * firebase.auth().signInAndRetrieveDataWithCredential(credential)
1138
+ * .then(function(userCredential) {
1139
+ * console.log(userCredential.additionalUserInfo.username);
1140
+ * });
1141
+ *
1142
+ * @param {!firebase.auth.AuthCredential} credential The auth credential.
1143
+ * @return {!firebase.Promise<!firebase.auth.UserCredential>}
1144
+ */
1145
+ firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential =
1146
+ function(credential) {};
1147
+
724
1148
 
725
1149
  /**
726
1150
  * Asynchronously signs in using a custom token.
@@ -804,6 +1228,94 @@ firebase.auth.Auth.prototype.signInWithEmailAndPassword =
804
1228
  function(email, password) {};
805
1229
 
806
1230
 
1231
+ /**
1232
+ * Asynchronously signs in using a phone number. This method sends a code via
1233
+ * SMS to the given phone number, and returns a
1234
+ * {@link firebase.auth.ConfirmationResult}. After the user provides the code
1235
+ * sent to their phone, call {@link firebase.auth.ConfirmationResult#confirm}
1236
+ * with the code to sign the user in.
1237
+ *
1238
+ * For abuse prevention, this method also requires a
1239
+ * {@link firebase.auth.ApplicationVerifier}. The Firebase Auth SDK includes
1240
+ * a reCAPTCHA-based implementation, {@link firebase.auth.RecaptchaVerifier}.
1241
+ *
1242
+ * <h4>Error Codes</h4>
1243
+ * <dl>
1244
+ * <dt>auth/captcha-check-failed</dt>
1245
+ * <dd>Thrown if the reCAPTCHA response token was invalid, expired, or if
1246
+ * this method was called from a non-whitelisted domain.</dd>
1247
+ * <dt>auth/invalid-phone-number</dt>
1248
+ * <dd>Thrown if the phone number has an invalid format.</dd>
1249
+ * <dt>auth/missing-phone-number</dt>
1250
+ * <dd>Thrown if the phone number is missing.</dd>
1251
+ * <dt>auth/quota-exceeded</dt>
1252
+ * <dd>Thrown if the SMS quota for the Firebase project has been exceeded.</dd>
1253
+ * <dt>auth/user-disabled</dt>
1254
+ * <dd>Thrown if the user corresponding to the given phone number has been
1255
+ * disabled.</dd>
1256
+ * <dt>auth/operation-not-allowed</dt>
1257
+ * <dd>Thrown if you have not enabled the provider in the Firebase Console. Go
1258
+ * to the Firebase Console for your project, in the Auth section and the
1259
+ * <strong>Sign in Method</strong> tab and configure the provider.</dd>
1260
+ * </dl>
1261
+ *
1262
+ * @example
1263
+ * // 'recaptcha-container' is the ID of an element in the DOM.
1264
+ * var applicationVerifier = new firebase.auth.RecaptchaVerifier(
1265
+ * 'recaptcha-container');
1266
+ * firebase.auth().signInWithPhoneNumber(phoneNumber, applicationVerifier)
1267
+ * .then(function(confirmationResult) {
1268
+ * var verificationCode = window.prompt('Please enter the verification ' +
1269
+ * 'code that was sent to your mobile device.');
1270
+ * return confirmationResult.confirm(verificationCode);
1271
+ * })
1272
+ * .catch(function(error) {
1273
+ * // Handle Errors here.
1274
+ * });
1275
+ *
1276
+ * @param {string} phoneNumber The user's phone number in E.164 format (e.g.
1277
+ * +16505550101).
1278
+ * @param {!firebase.auth.ApplicationVerifier} applicationVerifier
1279
+ * @return {!firebase.Promise<!firebase.auth.ConfirmationResult>}
1280
+ */
1281
+ firebase.auth.Auth.prototype.signInWithPhoneNumber =
1282
+ function(phoneNumber, applicationVerifier) {};
1283
+
1284
+
1285
+ /**
1286
+ * A result from a phone number sign-in, link, or reauthenticate call.
1287
+ * @interface
1288
+ */
1289
+ firebase.auth.ConfirmationResult;
1290
+
1291
+
1292
+ /**
1293
+ * The phone number authentication operation's verification ID. This can be used
1294
+ * along with the verification code to initialize a phone auth credential.
1295
+ *
1296
+ * @type {string}
1297
+ */
1298
+ firebase.auth.ConfirmationResult.prototype.verificationId;
1299
+
1300
+
1301
+ /**
1302
+ * Finishes a phone number sign-in, link, or reauthentication, given the code
1303
+ * that was sent to the user's mobile device.
1304
+ *
1305
+ * <h4>Error Codes</h4>
1306
+ * <dl>
1307
+ * <dt>auth/invalid-verification-code</dt>
1308
+ * <dd>Thrown if the verification code is not valid.</dd>
1309
+ * <dt>auth/missing-verification-code</dt>
1310
+ * <dd>Thrown if the verification code is missing.</dd>
1311
+ * </dl>
1312
+ * @param {string} verificationCode
1313
+ * @return {!firebase.Promise<!firebase.auth.UserCredential>}
1314
+ */
1315
+ firebase.auth.ConfirmationResult.prototype.confirm =
1316
+ function(verificationCode) {};
1317
+
1318
+
807
1319
  /**
808
1320
  * Asynchronously signs in as an anonymous user.
809
1321
  *
@@ -836,15 +1348,33 @@ firebase.auth.Auth.prototype.signInAnonymously = function() {};
836
1348
 
837
1349
 
838
1350
  /**
839
- * A structure containing a User and an AuthCredential.
1351
+ * A structure containing a User, an AuthCredential, the operationType, and
1352
+ * any additional user information that was returned from the identity provider.
1353
+ * operationType could be 'signIn' for a sign-in operation, 'link' for a linking
1354
+ * operation and 'reauthenticate' for a reauthentication operation.
840
1355
  *
841
1356
  * @typedef {{
842
1357
  * user: ?firebase.User,
843
- * credential: ?firebase.auth.AuthCredential
1358
+ * credential: ?firebase.auth.AuthCredential,
1359
+ * operationType: (?string|undefined),
1360
+ * additionalUserInfo: (?firebase.auth.AdditionalUserInfo|undefined)
844
1361
  * }}
845
1362
  */
846
1363
  firebase.auth.UserCredential;
847
1364
 
1365
+
1366
+ /**
1367
+ * A structure containing additional user information from a federated identity
1368
+ * provider.
1369
+ * @typedef {{
1370
+ * providerId: string,
1371
+ * profile: ?Object,
1372
+ * username: (?string|undefined)
1373
+ * }}
1374
+ */
1375
+ firebase.auth.AdditionalUserInfo;
1376
+
1377
+
848
1378
  /**
849
1379
  * Signs out the current user.
850
1380
  *
@@ -890,8 +1420,8 @@ firebase.auth.Auth.prototype.signOut = function() {};
890
1420
  * <strong>Sign in Method</strong> tab and configure the provider.</dd>
891
1421
  * <dt>auth/requires-recent-login</dt>
892
1422
  * <dd>Thrown if the user's last sign-in time does not meet the security
893
- * threshold. Use {@link firebase.User#reauthenticate} to resolve. This does
894
- * not apply if the user is anonymous.</dd>
1423
+ * threshold. Use {@link firebase.User#reauthenticateWithCredential} to
1424
+ * resolve. This does not apply if the user is anonymous.</dd>
895
1425
  * <dt>auth/too-many-requests</dt>
896
1426
  * <dd>Thrown if requests are blocked from a device due to unusual activity.
897
1427
  * Trying again after some delay would unblock.</dd>
@@ -946,6 +1476,7 @@ firebase.auth.AuthProvider = function() {};
946
1476
  /** @type {string} */
947
1477
  firebase.auth.AuthProvider.prototype.providerId;
948
1478
 
1479
+
949
1480
  /**
950
1481
  * Facebook auth provider.
951
1482
  *
@@ -1001,6 +1532,7 @@ firebase.auth.FacebookAuthProvider.prototype.providerId;
1001
1532
 
1002
1533
  /**
1003
1534
  * @param {string} scope Facebook OAuth scope.
1535
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1004
1536
  */
1005
1537
  firebase.auth.FacebookAuthProvider.prototype.addScope = function(scope) {};
1006
1538
 
@@ -1015,6 +1547,7 @@ firebase.auth.FacebookAuthProvider.prototype.addScope = function(scope) {};
1015
1547
  * 'scope', 'response_type' and 'state' are not allowed and will be ignored.
1016
1548
  * @param {!Object} customOAuthParameters The custom OAuth parameters to pass
1017
1549
  * in the OAuth request.
1550
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1018
1551
  */
1019
1552
  firebase.auth.FacebookAuthProvider.prototype.setCustomParameters =
1020
1553
  function(customOAuthParameters) {};
@@ -1107,6 +1640,7 @@ firebase.auth.GithubAuthProvider.prototype.providerId;
1107
1640
 
1108
1641
  /**
1109
1642
  * @param {string} scope Github OAuth scope.
1643
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1110
1644
  */
1111
1645
  firebase.auth.GithubAuthProvider.prototype.addScope = function(scope) {};
1112
1646
 
@@ -1120,6 +1654,7 @@ firebase.auth.GithubAuthProvider.prototype.addScope = function(scope) {};
1120
1654
  * 'scope', 'response_type' and 'state' are not allowed and will be ignored.
1121
1655
  * @param {!Object} customOAuthParameters The custom OAuth parameters to pass
1122
1656
  * in the OAuth request.
1657
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1123
1658
  */
1124
1659
  firebase.auth.GithubAuthProvider.prototype.setCustomParameters =
1125
1660
  function(customOAuthParameters) {};
@@ -1187,6 +1722,7 @@ firebase.auth.GoogleAuthProvider.prototype.providerId;
1187
1722
 
1188
1723
  /**
1189
1724
  * @param {string} scope Google OAuth scope.
1725
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1190
1726
  */
1191
1727
  firebase.auth.GoogleAuthProvider.prototype.addScope = function(scope) {};
1192
1728
 
@@ -1202,6 +1738,7 @@ firebase.auth.GoogleAuthProvider.prototype.addScope = function(scope) {};
1202
1738
  * 'scope', 'response_type' and 'state' are not allowed and will be ignored.
1203
1739
  * @param {!Object} customOAuthParameters The custom OAuth parameters to pass
1204
1740
  * in the OAuth request.
1741
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1205
1742
  */
1206
1743
  firebase.auth.GoogleAuthProvider.prototype.setCustomParameters =
1207
1744
  function(customOAuthParameters) {};
@@ -1264,6 +1801,7 @@ firebase.auth.TwitterAuthProvider.prototype.providerId;
1264
1801
  * 'oauth_token', 'oauth_signature', etc are not allowed and will be ignored.
1265
1802
  * @param {!Object} customOAuthParameters The custom OAuth parameters to pass
1266
1803
  * in the OAuth request.
1804
+ * @return {!firebase.auth.AuthProvider} The provider instance itself.
1267
1805
  */
1268
1806
  firebase.auth.TwitterAuthProvider.prototype.setCustomParameters =
1269
1807
  function(customOAuthParameters) {};
@@ -1298,3 +1836,113 @@ firebase.auth.EmailAuthProvider.credential = function(email, password) {};
1298
1836
 
1299
1837
  /** @type {string} */
1300
1838
  firebase.auth.EmailAuthProvider.prototype.providerId;
1839
+
1840
+
1841
+
1842
+ /**
1843
+ * Phone number auth provider.
1844
+ *
1845
+ * @example
1846
+ * // 'recaptcha-container' is the ID of an element in the DOM.
1847
+ * var applicationVerifier = new firebase.auth.RecaptchaVerifier(
1848
+ * 'recaptcha-container');
1849
+ * var provider = new firebase.auth.PhoneAuthProvider();
1850
+ * provider.verifyPhoneNumber('+16505550101', applicationVerifier)
1851
+ * .then(function(verificationId) {
1852
+ * var verificationCode = window.prompt('Please enter the verification ' +
1853
+ * 'code that was sent to your mobile device.');
1854
+ * return firebase.auth.PhoneAuthProvider.credential(verificationId,
1855
+ * verificationCode);
1856
+ * })
1857
+ * .then(function(phoneCredential) {
1858
+ * return firebase.auth().signInWithCredential(phoneCredential);
1859
+ * });
1860
+ *
1861
+ * @constructor
1862
+ * @param {?firebase.auth.Auth=} auth The Firebase Auth instance in which
1863
+ * sign-ins should occur. Uses the default Auth instance if unspecified.
1864
+ * @implements {firebase.auth.AuthProvider}
1865
+ */
1866
+ firebase.auth.PhoneAuthProvider = function(auth) {};
1867
+
1868
+ /** @type {string} */
1869
+ firebase.auth.PhoneAuthProvider.PROVIDER_ID;
1870
+
1871
+ /**
1872
+ * Creates a phone auth credential, given the verification ID from
1873
+ * {@link firebase.auth.PhoneAuthProvider#verifyPhoneNumber} and the code
1874
+ * that was sent to the user's mobile device.
1875
+ *
1876
+ * <h4>Error Codes</h4>
1877
+ * <dl>
1878
+ * <dt>auth/missing-verification-code</dt>
1879
+ * <dd>Thrown if the verification code is missing.</dd>
1880
+ * <dt>auth/missing-verification-id</dt>
1881
+ * <dd>Thrown if the verification ID is missing.</dd>
1882
+ * </dl>
1883
+ *
1884
+ * @param {string} verificationId The verification ID returned from
1885
+ * {@link firebase.auth.PhoneAuthProvider#verifyPhoneNumber}.
1886
+ * @param {string} verificationCode The verification code sent to the user's
1887
+ * mobile device.
1888
+ * @return {!firebase.auth.AuthCredential} The auth provider credential.
1889
+ */
1890
+ firebase.auth.PhoneAuthProvider.credential =
1891
+ function(verificationId, verificationCode) {};
1892
+
1893
+ /** @type {string} */
1894
+ firebase.auth.PhoneAuthProvider.prototype.providerId;
1895
+
1896
+ /**
1897
+ * Starts a phone number authentication flow by sending a verification code to
1898
+ * the given phone number. Returns an ID that can be passed to
1899
+ * {@link firebase.auth.PhoneAuthProvider#credential} to identify this flow.
1900
+ *
1901
+ * For abuse prevention, this method also requires a
1902
+ * {@link firebase.auth.ApplicationVerifier}. The Firebase Auth SDK includes
1903
+ * a reCAPTCHA-based implementation, {@link firebase.auth.RecaptchaVerifier}.
1904
+ *
1905
+ * <h4>Error Codes</h4>
1906
+ * <dl>
1907
+ * <dt>auth/captcha-check-failed</dt>
1908
+ * <dd>Thrown if the reCAPTCHA response token was invalid, expired, or if
1909
+ * this method was called from a non-whitelisted domain.</dd>
1910
+ * <dt>auth/invalid-phone-number</dt>
1911
+ * <dd>Thrown if the phone number has an invalid format.</dd>
1912
+ * <dt>auth/missing-phone-number</dt>
1913
+ * <dd>Thrown if the phone number is missing.</dd>
1914
+ * <dt>auth/quota-exceeded</dt>
1915
+ * <dd>Thrown if the SMS quota for the Firebase project has been exceeded.</dd>
1916
+ * <dt>auth/user-disabled</dt>
1917
+ * <dd>Thrown if the user corresponding to the given phone number has been
1918
+ * disabled.</dd>
1919
+ * </dl>
1920
+ *
1921
+ * @param {string} phoneNumber The user's phone number in E.164 format (e.g.
1922
+ * +16505550101).
1923
+ * @param {!firebase.auth.ApplicationVerifier} applicationVerifier
1924
+ * @return {!firebase.Promise<string>} A Promise for the verification ID.
1925
+ */
1926
+ firebase.auth.PhoneAuthProvider.prototype.verifyPhoneNumber =
1927
+ function(phoneNumber, applicationVerifier) {};
1928
+
1929
+
1930
+ /**
1931
+ * A verifier for domain verification and abuse prevention. Currently, the
1932
+ * only implementation is {@link firebase.auth.RecaptchaVerifier}.
1933
+ * @interface
1934
+ */
1935
+ firebase.auth.ApplicationVerifier = function() {};
1936
+
1937
+ /**
1938
+ * Identifies the type of application verifier (e.g. "recaptcha").
1939
+ * @type {string}
1940
+ */
1941
+ firebase.auth.ApplicationVerifier.prototype.type;
1942
+
1943
+ /**
1944
+ * Executes the verification process.
1945
+ * @return {!firebase.Promise<string>} A Promise for a token that can be used to
1946
+ * assert the validity of a request.
1947
+ */
1948
+ firebase.auth.ApplicationVerifier.prototype.verify = function() {};