This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,8 @@ const dynamicLinksEnabled = lazy(() => typeof (com.google.firebase.dynamiclinks)
4949
5050 if ( dynamicLinksEnabled ( ) ) {
5151 // let's see if this is part of an email-link authentication flow
52- const firebaseAuth = com . google . firebase . auth . FirebaseAuth . getInstance ( ) ;
5352 const emailLink = "" + args . android . getData ( ) ;
54- if ( firebaseAuth . isSignInWithEmailLink ( emailLink ) ) {
53+ if ( authEnabled ( ) && com . google . firebase . auth . FirebaseAuth . getInstance ( ) . isSignInWithEmailLink ( emailLink ) ) {
5554 const rememberedEmail = firebase . getRememberedEmailForEmailLinkLogin ( ) ;
5655 if ( rememberedEmail !== undefined ) {
5756 const emailLinkOnCompleteListener = new com . google . android . gms . tasks . OnCompleteListener ( {
@@ -70,7 +69,7 @@ const dynamicLinksEnabled = lazy(() => typeof (com.google.firebase.dynamiclinks)
7069 const authCredential = com . google . firebase . auth . EmailAuthProvider . getCredentialWithLink ( rememberedEmail , emailLink ) ;
7170 user . linkWithCredential ( authCredential ) . addOnCompleteListener ( emailLinkOnCompleteListener ) ;
7271 } else {
73- firebaseAuth . signInWithEmailLink ( rememberedEmail , emailLink ) . addOnCompleteListener ( emailLinkOnCompleteListener ) ;
72+ com . google . firebase . auth . FirebaseAuth . getInstance ( ) . signInWithEmailLink ( rememberedEmail , emailLink ) . addOnCompleteListener ( emailLinkOnCompleteListener ) ;
7473 }
7574 }
7675
You can’t perform that action at this time.
0 commit comments