FirebaseUI-iOS
FirebaseUI-iOS copied to clipboard
default email address not working for signup
I want to use two different flows for signin and signup
I am currently using "email" parameter in signIn method for pre-fill the email address FUIEmailAuth.signIn(withPresenting: rootViewController, email: "[email protected]")
This method runs when I push the signIn button
func signin() {
self.authUI.tosurl = nil
self.authUI.privacyPolicyURL = nil
if let rootViewController = self.window?.rootViewController {
let providerFUIEmailAuth = FUIEmailAuth(authAuthUI: self.authUI, signInMethod: EmailPasswordAuthSignInMethod, forceSameDevice: false, allowNewEmailAccounts: false, requireDisplayName: false, actionCodeSetting: ActionCodeSettings())
let providers: [FUIAuthProvider] = [
providerFUIEmailAuth
]
self.authUI.providers = providers
providerFUIEmailAuth.signIn(withPresenting: rootViewController, email: defaultEmail)
}
}
and this one runs when I push the signUp button
func signup() {
self.authUI.tosurl = URL(string: "https://uptivo.fit/privacy-and-terms-of-use/")!
self.authUI.privacyPolicyURL = URL(string: "https://uptivo.fit/privacy-and-terms-of-use/")!
if let rootViewController = self.window?.rootViewController {
let providerFUIEmailAuth = FUIEmailAuth(authAuthUI: self.authUI, signInMethod: EmailPasswordAuthSignInMethod, forceSameDevice: false, allowNewEmailAccounts: true, requireDisplayName: false, actionCodeSetting: ActionCodeSettings())
let providers: [FUIAuthProvider] = [
providerFUIEmailAuth
]
self.authUI.providers = providers
providerFUIEmailAuth.signIn(withPresenting: rootViewController, email: defaultEmail)
}
}
It is working fine for signIn but not for signUp Is it a bug? Is there any other way to pre-fill the signup email address?