[英]Email login option gone after FirebaseAuth upgrade iOS
I suddenly no longer get the email option on the login page.我突然不再在登录页面上看到 email 选项。 It was always there and then since upgrading it is now gone!
它一直在那里,然后自从升级后它就消失了!
Here is how I declare the providers:这是我声明提供者的方式:
let providers: [FUIAuthProvider] = [
FUIGoogleAuth(),
FUIFacebookAuth(),
FUITwitterAuth(),
FUIPhoneAuth(authUI:FUIAuth.defaultAuthUI()!)
]
I don't see any new EmailAuth.我没有看到任何新的 EmailAuth。 Evidently it was always defaulted in and now it is gone and I can't find any notice of a change.
显然它总是默认的,现在它不见了,我找不到任何更改通知。
EDIT:编辑:
Tried adding:尝试添加:
let providers: [FUIAuthProvider] = [
FUIEmailAuthProvider(), <====== compile error
FUIGoogleAuth(),
FUIFacebookAuth(),
FUITwitterAuth(),
FUIPhoneAuth(authUI:FUIAuth.defaultAuthUI()!)
]
but got this error:但出现此错误:
'FUIEmailAuthProvider' cannot be constructed because it has no accessible initializers无法构造“FUIEmailAuthProvider”,因为它没有可访问的初始值设定项
First needed:首先需要:
pod 'FirebaseUI/Email'
Then added: FUIEmailAuth(),然后添加:FUIEmailAuth(),
What if you replace FUIEmailAuthProvider()
with FUIEmailAuth()
instead;如果您将
FUIEmailAuthProvider()
替换为FUIEmailAuthProvider()
FUIEmailAuth()
;
let providers: [FUIAuthProvider] = [
FUIEmailAuth(),
FUIGoogleAuth(),
FUIFacebookAuth(),
FUITwitterAuth(),
FUIPhoneAuth(authUI: FUIAuth.defaultAuthUI()),
]
And add the following to the Podfile:
并将以下内容添加到
Podfile:
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Email'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/Twitter'
pod 'FirebaseUI/Phone'
According to: Using FirebaseUI for Authentication根据: 使用 FirebaseUI 进行身份验证
Actually its not properly described in the Firebase Documentation for iOS.实际上它在 iOS 的 Firebase 文档中没有正确描述。
You have to add the pod pod 'FirebaseUI/Email'
and after that:您必须添加 pod
pod 'FirebaseUI/Email'
,然后:
that will trigger Email sign in.这将触发电子邮件登录。
Ran into this issue as well.也遇到了这个问题。 The following seemed to fix it for me:
以下似乎为我修复了它:
Add pod 'FirebaseUI/Email'
to your pod file将
pod 'FirebaseUI/Email'
添加到您的 pod 文件
Make sure that you have the correct import: import 'FirebaseEmailAuthUI'
确保您有正确的导入:
import 'FirebaseEmailAuthUI'
As mentioned previously, include FUIEmailAuth()
as a provider:如前所述,包括
FUIEmailAuth()
作为提供者:
let providers = [
FUIEmailAuth(),
// ..
// ... other providers ...
// ..
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.