use*_*630 5 sms ios firebase firebase-authentication
我有一个应用程序,该应用程序通过电话短信验证和验证码来使用Firebase身份验证(没有APNS)
如果您使用的是iOS 11.4.1,则该应用程序可以在身份验证过程中正常运行
但是,如果您使用的是iOS 12,则身份验证过程将导致无效的令牌消息
错误域= FIRAuthErrorDomain代码= 17048“无效的令牌。” UserInfo = {NSLocalizedDescription =无效的令牌。,error_name = INVALID_APP_CREDENTIAL}
当前使用最新的Firebase ios SDK 5.9.0最新版本的xcode iOS 12最新的Mac OS Mojave 10.14
我在2018年6月(3个月前)看到了一个较早的问题,但不确定是否与我们的项目有关 https://github.com/firebase/firebase-js-sdk/issues/916
https://github.com/firebase/firebase-ios-sdk
是否有解决方案,或者这是Firebase iOS SDK错误?
小智 5
在 Firebase 中为 APN 使用 .p12 文件时似乎存在问题。我遇到了同样的问题并解决了它更改 .p8 的 .p12 证书立即改变了这一点,我的应用程序收到了 SMS。
您可以在 Apple Developer 帐户的“密钥”部分中生成 .p8 文件,下载文件并将其保存在安全位置。这个新密钥还会生成一个在 Firebase 设置中需要的KeyId。最后,您需要与您的 Apple Developer 帐户相对应的TeamId,您可以在配置文件设置中找到它。
希望这可以帮到你。
小智 -3
我也使用您在问题中描述的相同配置,并且我正在使用这个 firebase 方法,它运行完美。这样您就可以检查您正在使用的凭据。另请检查 firebase 文档。
Auth.auth().signIn(withEmail: email, password: password) { (result, error) in
if error == nil {
guard let user = result?.user else {
return
}
// do your stuff
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1589 次 |
| 最近记录: |