-1

First I am calling -

FBSDKLoginManager().logIn(withReadPermissions: ["public_profile", "email"], from: self)

On success getting credential -

let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)

Then passing the credential to linkAndRetrieveData -

Auth.auth().currentUser?.linkAndRetrieveData(with: credential)

Getting this error, which says “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";
}

It works fine with -

Auth.auth().signInAndRetrieveData

What I am doing wrong here?

Namit Gupta
  • 796
  • 9
  • 20

1 Answers1

3

It should be fix soon with Firebase Authentication version 5.4.1. See the issue below:

https://github.com/firebase/firebase-ios-sdk/issues/2522

Jenny Yao
  • 46
  • 3