code: function(authData, background) {
          if (!this._completionDeferred) {
              throw new Error("submitAuthDict() called before attemptAuth()");
          }
  
          // use the sessionid from the last request.
          const auth = {
              session: this._data.session,
          };
          utils.extend(auth, authData);
  
          this._doRequest(auth, background);
      }
docs: submit a new auth dict and fire off the request. This will either
  make attemptAuth resolve/reject, or cause the startAuthStage callback
  to be called for a new stage.
  
  @param {object} authData new auth dict to send to the server. Should
  include a `type` propterty denoting the login type, as well as any
  other params for that stage.
  @param {bool} background If true, this request failing will not result
  in the attemptAuth promise being rejected. This can be set to true
  for requests that just poll to see if auth has been completed elsewhere.