@@ -182,7 +182,7 @@ firebase.addAppDelegateMethods = appDelegate => {
182182 }
183183 } ;
184184 const fIRAuthCredential = FIREmailAuthProvider . credentialWithEmailLink ( rememberedEmail , userActivity . webpageURL . absoluteString ) ;
185- fAuth . currentUser . linkAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
185+ fAuth . currentUser . linkWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
186186
187187 } else {
188188 fAuth . signInWithEmailLinkCompletion ( rememberedEmail , userActivity . webpageURL . absoluteString , ( authData : FIRAuthDataResult , error : NSError ) => {
@@ -229,28 +229,6 @@ firebase.addAppDelegateMethods = appDelegate => {
229229 }
230230} ;
231231
232- firebase . fetchProvidersForEmail = email => {
233- return new Promise ( ( resolve , reject ) => {
234- try {
235- if ( typeof ( email ) !== "string" ) {
236- reject ( "A parameter representing an email address is required." ) ;
237- return ;
238- }
239-
240- FIRAuth . auth ( ) . fetchProvidersForEmailCompletion ( email , ( providerNSArray , error ) => {
241- if ( error ) {
242- reject ( error . localizedDescription ) ;
243- } else {
244- resolve ( firebaseUtils . toJsObject ( providerNSArray ) ) ;
245- }
246- } ) ;
247- } catch ( ex ) {
248- console . log ( "Error in firebase.fetchProvidersForEmail: " + ex ) ;
249- reject ( ex ) ;
250- }
251- } ) ;
252- } ;
253-
254232firebase . fetchSignInMethodsForEmail = email => {
255233 return new Promise ( ( resolve , reject ) => {
256234 try {
@@ -781,12 +759,12 @@ firebase.login = arg => {
781759 if ( error ) {
782760 // ignore, as this one was probably already linked, so just return the user
783761 log ( "--- linking error: " + error . localizedDescription ) ;
784- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
762+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
785763 } else {
786764 onCompletionWithAuthResult ( authData , error ) ;
787765 }
788766 } ;
789- fAuth . currentUser . linkAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
767+ fAuth . currentUser . linkWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
790768
791769 } else {
792770 fAuth . signInWithEmailPasswordCompletion ( arg . passwordOptions . email , arg . passwordOptions . password , onCompletionWithAuthResult ) ;
@@ -851,14 +829,14 @@ firebase.login = arg => {
851829 const onCompletionLink = ( authData : FIRAuthDataResult , error : NSError ) => {
852830 if ( error ) {
853831 // ignore, as this one was probably already linked, so just return the user
854- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
832+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
855833 } else {
856834 onCompletionWithAuthResult ( authData , error ) ;
857835 }
858836 } ;
859- fAuth . currentUser . linkAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
837+ fAuth . currentUser . linkWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
860838 } else {
861- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
839+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
862840 }
863841 } , arg . phoneOptions . verificationPrompt ) ;
864842 } ) ;
@@ -905,15 +883,15 @@ firebase.login = arg => {
905883 if ( error ) {
906884 // ignore, as this one was probably already linked, so just return the user
907885 log ( "--- linking error: " + error . localizedDescription ) ;
908- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
886+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
909887 } else {
910888 onCompletionWithAuthResult ( authData ) ;
911889 }
912890 } ;
913- fAuth . currentUser . linkAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
891+ fAuth . currentUser . linkWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
914892
915893 } else {
916- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
894+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
917895 }
918896 }
919897 } ;
@@ -963,15 +941,15 @@ firebase.login = arg => {
963941 const onCompletionLink = ( user , error ) => {
964942 if ( error ) {
965943 // ignore, as this one was probably already linked, so just return the user
966- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
944+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
967945 } else {
968946 onCompletionWithAuthResult ( user ) ;
969947 }
970948 } ;
971- fAuth . currentUser . linkAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
949+ fAuth . currentUser . linkWithCredentialCompletion ( fIRAuthCredential , onCompletionLink ) ;
972950
973951 } else {
974- fAuth . signInAndRetrieveDataWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
952+ fAuth . signInWithCredentialCompletion ( fIRAuthCredential , onCompletionWithAuthResult ) ;
975953 }
976954
977955 } else {
0 commit comments