title: LinkedIn login with custom token ( ERROR_INVALID_CUSTOM_TOKEN )
body: <p>I am trying to login with LinkedIn using the native app and the LinkedIn SDK. So far I can login using the web if the LinkedIn app is not installed. I can also login with LinkedIn and get a token in return. But when I try to authenticate with Firebase I get this error:</p>
  
  <pre><code>Optional(Error Domain=FIRAuthErrorDomain Code=17000 "The custom token 
  format is incorrect. Please check the documentation." UserInfo=
  {NSLocalizedDescription=The custom token format is incorrect. Please 
  check the documentation., error_name=ERROR_INVALID_CUSTOM_TOKEN})
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>        // App installed
          let permissions = [LISDK_BASIC_PROFILE_PERMISSION,LISDK_EMAILADDRESS_PERMISSION]
  
          LISDKSessionManager.createSession(withAuth: permissions, state: nil, showGoToAppStoreDialog: true, successBlock: { (returnState) -&gt; Void in
              LISDKAPIHelper.sharedInstance().getRequest("https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url,public-profile-url,industry,positions,location)?format=json", success: { (response) -&gt; Void in
  
                  if let data = response?.data.data(using: String.Encoding.utf8) {
                     if let dictResponse = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers){
  
                          let token = LISDKSessionManager.sharedInstance().session.accessToken.accessTokenValue
  
                          Auth.auth().signIn(withCustomToken: token!  ) { (user, error) in
                              print(user!)
                              print(error!)
                          }
                      }
                  }
  
              }, error: { (error) -&gt; Void in
                  print("LINKEDIN error\(String(describing: error))")
  
              })
  
          }) { (error) -&gt; Void in
              print("error login linkedin")
          }
  </code></pre>
  
  <p>The token I am sending to Firebase is a String, so that should be okay. I must be missing something. But what ? </p>