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

passwordSignUpViewController() delegate function not called

Open angeria opened this issue 5 years ago • 2 comments

Environment

  • Swift 5
  • iOS version: 12.4
  • Firebase SDK version: 6.5.0
  • FirebaseUI version: 8.0.3
  • CocoaPods Version: 1.7.5

Issue

I'm having trouble customizing the sign up view controller by implementing this in my AuthUI delegate:

func passwordSignUpViewController(forAuthUI authUI: FUIAuth, email: String) -> FUIPasswordSignUpViewController {
  return FUICustomPasswordSignUpViewController(nibName: "FUICustomPasswordSignUpViewController",
                                               bundle: Bundle.main,
                                               authUI: authUI,
                                               email: email)
}

Even though I'm using the FUICustomPasswordSignUpViewController.xib and .swift files from the sample project, the delegate function is not called and the view is not customized. However, it works for the email entry view controller with the exact same setup.

I believe this must be a bug in FirebaseUI (or sample code) since this behavior is also the case in the sample project fresh out of master. All other views I've tried are customized (including the email entry view just before the sign up view).

Screenshots from sample project

IMG_5212 IMG_5213 IMG_5214

angeria avatar Aug 04 '19 12:08 angeria

Add extra requireDisplayName parameter:

func passwordSignUpViewController(forAuthUI authUI: FUIAuth, email: String, requireDisplayName: Bool) -> FUIPasswordSignUpViewController {
        return FUICustomPasswordSignUpViewController(nibName: "FUICustomPasswordSignUpViewController",
                                                     bundle: Bundle.main,
                                                     authUI: authUI,
                                                     email: email,
                                                     requireDisplayName: requireDisplayName
        )
    }

leialey avatar Sep 25 '19 12:09 leialey

@leialey 's solution works for me. But indeed the code here: https://firebase.google.com/docs/auth/ios/firebaseui is incorrect.

Xendrez avatar Apr 10 '20 13:04 Xendrez