iOS 中的 linkAndRetrieveData 无法与 Facebook 一起用于 Firebase 身份验证
linkAndRetrieveData not working with Facebook for Firebase Authentication in iOS
首先我打电话给 -
FBSDKLoginManager().logIn(withReadPermissions: ["public_profile", "email"], from: self)
成功获得凭证 -
let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
然后将凭据传递给 linkAndRetrieveData -
Auth.auth().currentUser?.linkAndRetrieveData(with: credential)
收到此错误,显示“MISSING_ID_TOKEN”-
{
FIRAuthErrorUserInfoNameKey = "ERROR_INTERNAL_ERROR";
NSLocalizedDescription = "An internal error has occurred, print and inspect the error details for more information.";
NSUnderlyingError = "Error Domain=FIRAuthInternalErrorDomain Code=3 \"(null)\" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={\n code = 400;\n message = \"MISSING_ID_TOKEN\";\n status = \"INVALID_ARGUMENT\";\n}}";
"error_name" = "ERROR_INTERNAL_ERROR";
}
它适用于 -
Auth.auth().signInAndRetrieveData
我在这里做错了什么?
Firebase 身份验证版本 5.4.1 应该会很快修复它。请参阅以下问题:
首先我打电话给 -
FBSDKLoginManager().logIn(withReadPermissions: ["public_profile", "email"], from: self)
成功获得凭证 -
let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
然后将凭据传递给 linkAndRetrieveData -
Auth.auth().currentUser?.linkAndRetrieveData(with: credential)
收到此错误,显示“MISSING_ID_TOKEN”-
{
FIRAuthErrorUserInfoNameKey = "ERROR_INTERNAL_ERROR";
NSLocalizedDescription = "An internal error has occurred, print and inspect the error details for more information.";
NSUnderlyingError = "Error Domain=FIRAuthInternalErrorDomain Code=3 \"(null)\" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={\n code = 400;\n message = \"MISSING_ID_TOKEN\";\n status = \"INVALID_ARGUMENT\";\n}}";
"error_name" = "ERROR_INTERNAL_ERROR";
}
它适用于 -
Auth.auth().signInAndRetrieveData
我在这里做错了什么?
Firebase 身份验证版本 5.4.1 应该会很快修复它。请参阅以下问题: