authUI didSignInWithUser never fired
Hi, the following function
- (void)authUI:(FIRAuthUI *)authUI didSignInWithUser:(nullable FIRUser *)user error:(nullable NSError *)error never fires.
similar problem has been discussed here: http://stackoverflow.com/questions/37426176/how-to-use-firebaseui-for-google-authentication-on-ios-in-swift
I have checked:
- setDelegate:self
- openurl is fired after the auth flow
- method is added to openURL, return [[FIRAuthUI authUI] handleOpenURL:url sourceApplication:sourceApplication];
any idea?
There's a bug that prevents [[FIRAuthUI authUI] authViewController] from being used as the root view controller of your app. The workaround is to use a placeholder view controller as your app's root view controller, then present [[FIRAuthUI authUI] authViewController] on top of it.
Please let us know if this solves the problem.
+1
I also confirmed that using presentViewController:animated:completion: resolves the problem.
As it was described. Firebase AuthPicker Controller must be presented in the next way:
UIViewController *controller = [authUI authViewController]; //returns your custom controller wrapped in UINavigationController
[self presentViewController:controller animated:YES completion:nil];
Duplicated by #138