updateAuth = (dispatch, firebase, authUpdate, updateInProfile) => {
  dispatch({ type: actionTypes.AUTH_UPDATE_START, payload: authUpdate })

  if (!firebase.auth().currentUser) {
    const error = new Error('User must be logged in to update auth.')
    dispatch({ type: actionTypes.AUTH_UPDATE_ERROR, payload: error })
    return Promise.reject(error)
  }

  return firebase
    .auth()
    .currentUser.updateProfile(authUpdate)
    .then((payload) => {
      dispatch({
        type: actionTypes.AUTH_UPDATE_SUCCESS,
        auth: firebase.auth().currentUser
      })
      if (updateInProfile) {
        return updateProfile(dispatch, firebase, authUpdate)
      }
      return payload
    })
    .catch((error) => {
      dispatch({ type: actionTypes.AUTH_UPDATE_ERROR, error })
      return Promise.reject(error)
    })
}
Update Auth Profile Object. Internally calls
`firebase.auth().currentUser.updateProfile` as seen [in the firebase docs](https://firebase.google.com/docs/auth/web/manage-users#update_a_users_profile).
@param {Function} dispatch - Action dispatch function
@param {object} firebase - Internal firebase object
@param {object} authUpdate - Update for current user's auth profile
@param {boolean} updateInProfile - Whether or not to update in profile as well
@returns {Promise} Resolves with results of updating auth
@private