handleRedirectResult = (dispatch, firebase, authData) => {
  // Run onRedirectResult if it exists in config
  if (typeof firebase._.config.onRedirectResult === 'function') {
    firebase._.config.onRedirectResult(authData, firebase, dispatch)
  }
  if (authData && authData.user) {
    const { user } = authData

    firebase._.authUid = user.uid // eslint-disable-line no-param-reassign
    watchUserProfile(dispatch, firebase)

    dispatch({
      type: actionTypes.LOGIN,
      auth: user,
      preserve: firebase._.config.preserveOnLogin
    })

    return createUserProfile(dispatch, firebase, user, {
      email: user.email,
      displayName: user.providerData[0].displayName || user.email,
      avatarUrl: user.providerData[0].photoURL,
      providerData: user.providerData
    })
  }
}
Redirect result handler
@param {Function} dispatch - Action dispatch function
@param {object} firebase - Internal firebase object
@param  {object} authData - Auth data from Firebase's getRedirectResult
@returns {void}
@private