@@ -616,98 +616,97 @@ fireauth.exportlib.exportFunction(
616
616
fireauth . ActionCodeURL . parseLink , [ fireauth . args . string ( 'link' ) ] ) ;
617
617
618
618
619
- ( function ( ) {
620
- if ( typeof firebase === 'undefined' || ! firebase . INTERNAL ||
621
- ! firebase . INTERNAL . registerComponent ) {
622
- throw new Error ( 'Cannot find the firebase namespace; be sure to include ' +
619
+ ( function ( ) {
620
+ if ( typeof firebase === 'undefined' || ! firebase . INTERNAL ||
621
+ ! firebase . INTERNAL . registerComponent ) {
622
+ throw new Error ( 'Cannot find the firebase namespace; be sure to include ' +
623
623
'firebase-app.js before this library.' ) ;
624
- } else {
625
- var namespace = {
626
- // Exports firebase.auth.ActionCodeInfo.Operation.
627
- 'ActionCodeInfo' : {
628
- 'Operation' : {
629
- 'EMAIL_SIGNIN' : fireauth . ActionCodeInfo . Operation . EMAIL_SIGNIN ,
630
- 'PASSWORD_RESET' : fireauth . ActionCodeInfo . Operation . PASSWORD_RESET ,
631
- 'RECOVER_EMAIL' : fireauth . ActionCodeInfo . Operation . RECOVER_EMAIL ,
632
- 'VERIFY_EMAIL' : fireauth . ActionCodeInfo . Operation . VERIFY_EMAIL
633
- }
634
- } ,
635
- 'Auth' : fireauth . Auth ,
636
- 'AuthCredential' : fireauth . AuthCredential ,
637
- 'Error' : fireauth . AuthError
638
- } ;
639
- fireauth . exportlib . exportFunction ( namespace ,
624
+ } else {
625
+ var namespace = {
626
+ // Exports firebase.auth.ActionCodeInfo.Operation.
627
+ 'ActionCodeInfo' : {
628
+ 'Operation' : {
629
+ 'EMAIL_SIGNIN' : fireauth . ActionCodeInfo . Operation . EMAIL_SIGNIN ,
630
+ 'PASSWORD_RESET' : fireauth . ActionCodeInfo . Operation . PASSWORD_RESET ,
631
+ 'RECOVER_EMAIL' : fireauth . ActionCodeInfo . Operation . RECOVER_EMAIL ,
632
+ 'VERIFY_EMAIL' : fireauth . ActionCodeInfo . Operation . VERIFY_EMAIL
633
+ }
634
+ } ,
635
+ 'Auth' : fireauth . Auth ,
636
+ 'AuthCredential' : fireauth . AuthCredential ,
637
+ 'Error' : fireauth . AuthError
638
+ } ;
639
+ fireauth . exportlib . exportFunction ( namespace ,
640
640
'EmailAuthProvider' , fireauth . EmailAuthProvider , [ ] ) ;
641
- fireauth . exportlib . exportFunction ( namespace ,
641
+ fireauth . exportlib . exportFunction ( namespace ,
642
642
'FacebookAuthProvider' , fireauth . FacebookAuthProvider , [ ] ) ;
643
- fireauth . exportlib . exportFunction ( namespace ,
643
+ fireauth . exportlib . exportFunction ( namespace ,
644
644
'GithubAuthProvider' , fireauth . GithubAuthProvider , [ ] ) ;
645
- fireauth . exportlib . exportFunction ( namespace ,
645
+ fireauth . exportlib . exportFunction ( namespace ,
646
646
'GoogleAuthProvider' , fireauth . GoogleAuthProvider , [ ] ) ;
647
- fireauth . exportlib . exportFunction ( namespace ,
647
+ fireauth . exportlib . exportFunction ( namespace ,
648
648
'TwitterAuthProvider' , fireauth . TwitterAuthProvider , [ ] ) ;
649
- fireauth . exportlib . exportFunction ( namespace ,
649
+ fireauth . exportlib . exportFunction ( namespace ,
650
650
'OAuthProvider' , fireauth . OAuthProvider , [
651
- fireauth . args . string ( 'providerId' )
651
+ fireauth . args . string ( 'providerId' )
652
652
] ) ;
653
- fireauth . exportlib . exportFunction ( namespace ,
653
+ fireauth . exportlib . exportFunction ( namespace ,
654
654
'SAMLAuthProvider' , fireauth . SAMLAuthProvider , [
655
- fireauth . args . string ( 'providerId' )
655
+ fireauth . args . string ( 'providerId' )
656
656
] ) ;
657
- fireauth . exportlib . exportFunction ( namespace ,
657
+ fireauth . exportlib . exportFunction ( namespace ,
658
658
'PhoneAuthProvider' , fireauth . PhoneAuthProvider , [
659
- fireauth . args . firebaseAuth ( true )
659
+ fireauth . args . firebaseAuth ( true )
660
660
] ) ;
661
- fireauth . exportlib . exportFunction ( namespace ,
661
+ fireauth . exportlib . exportFunction ( namespace ,
662
662
'RecaptchaVerifier' , fireauth . RecaptchaVerifier , [
663
- fireauth . args . or (
664
- fireauth . args . string ( ) ,
665
- fireauth . args . element ( ) ,
666
- 'recaptchaContainer' ) ,
667
- fireauth . args . object ( 'recaptchaParameters' , true ) ,
668
- fireauth . args . firebaseApp ( true )
663
+ fireauth . args . or (
664
+ fireauth . args . string ( ) ,
665
+ fireauth . args . element ( ) ,
666
+ 'recaptchaContainer' ) ,
667
+ fireauth . args . object ( 'recaptchaParameters' , true ) ,
668
+ fireauth . args . firebaseApp ( true )
669
669
] ) ;
670
- fireauth . exportlib . exportFunction ( namespace ,
670
+ fireauth . exportlib . exportFunction ( namespace ,
671
671
'ActionCodeURL' , fireauth . ActionCodeURL , [ ] ) ;
672
-
673
- // Create components to register
674
- const authComponent = {
675
- 'name' : fireauth . exportlib . AUTH_TYPE ,
676
- 'instanceFactory' : function ( container ) {
677
- var app = container [ 'getProvider' ] ( 'app' ) [ 'getImmediate' ] ( ) ;
678
- return new fireauth . Auth ( app ) ;
679
- } ,
680
- 'multipleInstances' : false ,
681
- 'serviceProps' : namespace ,
682
- 'instantiationMode' : 'LAZY' ,
683
- 'type' : 'PUBLIC'
684
- }
685
-
686
- const authInteropComponent = {
687
- 'name' : 'auth-internal' ,
688
- 'instanceFactory' : function ( container ) {
689
- var auth = container [ 'getProvider' ] ( fireauth . exportlib . AUTH_TYPE ) [ 'getImmediate' ] ( ) ;
690
- return {
691
- 'getUid' : goog . bind ( auth . getUid , auth ) ,
692
- 'getToken' : goog . bind ( auth . getIdTokenInternal , auth ) ,
693
- 'addAuthTokenListener' :
694
- goog . bind ( auth . addAuthTokenListenerInternal , auth ) ,
695
- 'removeAuthTokenListener' :
696
- goog . bind ( auth . removeAuthTokenListenerInternal , auth )
697
- } ;
698
- } ,
699
- 'multipleInstances' : false ,
700
- 'instantiationMode' : 'LAZY' ,
701
- 'type' : 'PRIVATE'
702
- } ;
703
-
704
- firebase . INTERNAL . registerComponent ( authComponent ) ;
705
- firebase . INTERNAL . registerComponent ( authInteropComponent ) ;
706
-
707
-
708
- // Expose User as firebase.User.
709
- firebase . INTERNAL . extendNamespace ( {
710
- 'User' : fireauth . AuthUser
711
- } ) ;
712
- }
713
- } ) ( ) ;
672
+
673
+ // Create auth components to register with firebase
674
+ const authComponent = { // provides Auth public APIs
675
+ 'name' : fireauth . exportlib . AUTH_TYPE ,
676
+ 'instanceFactory' : function ( container ) {
677
+ var app = container [ 'getProvider' ] ( 'app' ) [ 'getImmediate' ] ( ) ;
678
+ return new fireauth . Auth ( app ) ;
679
+ } ,
680
+ 'multipleInstances' : false ,
681
+ 'serviceProps' : namespace ,
682
+ 'instantiationMode' : 'LAZY' ,
683
+ 'type' : 'PUBLIC'
684
+ }
685
+
686
+ const authInteropComponent = { // provides Auth internal APIs
687
+ 'name' : 'auth-internal' ,
688
+ 'instanceFactory' : function ( container ) {
689
+ var auth = container [ 'getProvider' ] ( fireauth . exportlib . AUTH_TYPE ) [ 'getImmediate' ] ( ) ;
690
+ return {
691
+ 'getUid' : goog . bind ( auth . getUid , auth ) ,
692
+ 'getToken' : goog . bind ( auth . getIdTokenInternal , auth ) ,
693
+ 'addAuthTokenListener' :
694
+ goog . bind ( auth . addAuthTokenListenerInternal , auth ) ,
695
+ 'removeAuthTokenListener' :
696
+ goog . bind ( auth . removeAuthTokenListenerInternal , auth )
697
+ } ;
698
+ } ,
699
+ 'multipleInstances' : false ,
700
+ 'instantiationMode' : 'LAZY' ,
701
+ 'type' : 'PRIVATE'
702
+ } ;
703
+
704
+ firebase . INTERNAL . registerComponent ( authComponent ) ;
705
+ firebase . INTERNAL . registerComponent ( authInteropComponent ) ;
706
+
707
+ // Expose User as firebase.User.
708
+ firebase . INTERNAL . extendNamespace ( {
709
+ 'User' : fireauth . AuthUser
710
+ } ) ;
711
+ }
712
+ } ) ( ) ;
0 commit comments