title: Firebase Auth using phone number returns an internal error
body: <p>I set up my app to be able to send Apple Notifications using firebase and I verified that it works using the console. Now I want to do phone authentication which is built on top of APN.</p>
  
  <p>So I wrote this:</p>
  
  <pre><code>PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumber) { verificationID, error in
    if error != nil {
      print("Verification code not sent \(error!)")
    } else {
      print ("Successful.")
    }
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code>Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={NSUnderlyingError=0x170046db0 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
      code = 500;
      message = "&lt;null&gt;";
  }}}, error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information.}
  </code></pre>
  
  <p>Any idea? Should I file a bug against firebase?</p>
  
  <p>I am using iOS SDK 4.0.0 (latest zip I could find.)</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I disabled method swizzling by adding <code>FirebaseAppDelegateProxyEnabled</code> to <code>info.plist</code> and set it to <code>NO</code></p>
  
  <pre><code>func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
      // Pass device token to auth.
      Auth.auth().setAPNSToken(deviceToken, type: .prod)
  }
  </code></pre>