Skip to content

Commit 8cbf70c

Browse files
authored
Merge pull request #798 from morganchen12/auth2
Fix default value not being passed when allowNewEmailAccounts was disabled
2 parents 7ea1b84 + a25961d commit 8cbf70c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

EmailAuth/FirebaseEmailAuthUI/FUIEmailAuth.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ - (void)signInWithDefaultValue:(nullable NSString *)defaultValue
199199
}
200200
} else {
201201
if ([delegate respondsToSelector:@selector(emailEntryViewControllerForAuthUI:)]) {
202-
controller = [delegate passwordSignInViewControllerForAuthUI:self.authUI email:@""];
202+
controller = [delegate passwordSignInViewControllerForAuthUI:self.authUI
203+
email:defaultValue ?: @""];
203204
} else {
204-
controller = [[FUIPasswordSignInViewController alloc] initWithAuthUI:self.authUI email:nil];
205+
controller = [[FUIPasswordSignInViewController alloc] initWithAuthUI:self.authUI
206+
email:defaultValue];
205207
}
206208
}
207209

0 commit comments

Comments
 (0)