FirebaseUI-iOS icon indicating copy to clipboard operation
FirebaseUI-iOS copied to clipboard

authUI didSignInWithUser never fired

Open young310 opened this issue 10 years ago • 3 comments

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:

  1. setDelegate:self
  2. openurl is fired after the auth flow
  3. method is added to openURL, return [[FIRAuthUI authUI] handleOpenURL:url sourceApplication:sourceApplication];

any idea?

young310 avatar May 30 '16 09:05 young310

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.

ch40w31 avatar May 31 '16 23:05 ch40w31

+1

I also confirmed that using presentViewController:animated:completion: resolves the problem.

mhagmajer avatar Aug 07 '16 11:08 mhagmajer

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

yramanchuk avatar Sep 20 '16 22:09 yramanchuk