New Firebase Facebook login
<p>I'm trying to make a Facebook login with the new Firebase platform.</p>

<p>this is the code for the facebook login </p>

<pre><code>let facebookLogin = FBSDKLoginManager()
    facebookLogin.logInWithReadPermissions(["email"], fromViewController: self) { (result, error) -&gt; Void in
        if error != nil {
            print("error is \(error)")
        } else {
            let accessToken = FBSDKAccessToken.currentAccessToken().tokenString

            let credential = FIRFacebookAuthProvider.credentialWithAccessToken(accessToken)

            AUTH?.signInWithCredential(credential, completion: { (user, error) -&gt; Void in

                if error != nil {
                    print("error is \(error)")
                } else {
                    print(user)
                    NSUserDefaults.standardUserDefaults().setValue(user?.uid, forKey: KEY_UID)
                    self.performSegueWithIdentifier(SEGUE_LOGGEDIN, sender: nil)
                }
            })
        }
</code></pre>

<p>and this is the error code i get </p>

<blockquote>
  <p>Optional(Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR, NSUnderlyingError=0x79f082b0 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={type = immutable dict, count = 3,
  entries =></p>
  
  <p>0 : {contents = "errors"} = {type = immutable, count = 1, values = (</p>
  
  <p>0 : {type = immutable dict, count = 3,
  entries =></p>
  
  <p>0 : {contents = "reason"} = {contents = "invalid"}</p>
  
  <p>1 : {contents = "message"} = {contents = "Unsuccessful debug_token response from Facebook: {"error":{"message":"Invalid OAuth access token signature.","type":"OAuthException","code":190,"fbtrace_id":"BrewfOSy/fH"}}"}</p>
  
  <p>2 : {contents = "domain"} = {contents = "global"}
  }</p>
  
  <p>)}</p>
  
  <p>1 : {contents = "code"} = {value = +400, type = kCFNumberSInt64Type}</p>
  
  <p>2 : {contents = "message"} = {contents = "Unsuccessful debug_token response from Facebook: {"error":{"message":"Invalid OAuth access token signature.","type":"OAuthException","code":190,"fbtrace_id":"BrewfOSy/fH"}}"}</p>
  
  <p>}</p>
  
  <p>}}, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information.})</p>
</blockquote>