Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions Auth/FirebaseAuthUI/FUIAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,13 @@ - (BOOL)handleOpenURL:(NSURL *)URL
- (UINavigationController *)authViewController {
static UINavigationController *authViewController;

static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
UIViewController *controller;
if ([self.delegate respondsToSelector:@selector(authPickerViewControllerForAuthUI:)]) {
controller = [self.delegate authPickerViewControllerForAuthUI:self];
} else {
controller = [[FUIAuthPickerViewController alloc] initWithAuthUI:self];
}
authViewController = [[UINavigationController alloc] initWithRootViewController:controller];
});
UIViewController *controller;
if ([self.delegate respondsToSelector:@selector(authPickerViewControllerForAuthUI:)]) {
controller = [self.delegate authPickerViewControllerForAuthUI:self];
} else {
controller = [[FUIAuthPickerViewController alloc] initWithAuthUI:self];
}
authViewController = [[UINavigationController alloc] initWithRootViewController:controller];

return authViewController;
}
Expand Down