title: Multiple async action execution order in single epic
body: <p>I'm trying to setup <code>loginEpic</code> which occurs when user logs in. This is how the logic flow should work:</p>
  
  <p>Epic should start with <code>LOGIN_REQUEST</code> action. Once login promise is finished successfully, user info should be fetched with <code>SYNC_USER_REQUEST</code> action (which is basically whole other epic since this is also called when initially entering site to get user info or redirect to login). Once that finishes successfully (promise and SUCCESS/FAIL calls are handled within <code>syncUserEpic</code>), <code>SYNC_USER_SUCCESS</code> should be caught in <code>loginEpic</code> and <code>LOGIN_SUCCESS</code> should be called along with <code>push</code> action which redirects user to starting page.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>const loginEpic: Types.RootEpic = (action$) =&gt; 
      action$.ofType("LOGIN_REQUEST").pipe(
          switchMap(({ payload }) =&gt; 
              from(membershipService.login(payload.username, payload.password)).pipe(
                  switchMap((response) =&gt; [
                      syncUser.request(), 
                      action$.ofType("SYNC_USER_SUCCESS").pipe( // I think this is the problem
                          filter(isActionOf(syncUser.success)),
                          map(r =&gt; login.success(response))
                      )
                  ]),
                  takeUntil(action$.ofType(["LOGOUT_REQUEST", "LOGIN_CANCEL"])),
                  catchError(error =&gt; of(login.failure(error))),
                  endWith(push("/"))
              )
          )
      )
  </code></pre>
  
  <p>but I'm getting </p>
  
  <blockquote>
    <p>Actions must be plain objects. Use custom middleware for async
    actions.</p>
  </blockquote>
  
  <p>I'm also cancelling <code>LOGIN_REQUEST</code>/<code>SYNC_USER_REQUEST</code> with <code>LOGOUT_REQUEST</code> or <code>LOGIN_CANCEL</code> actions and also handling login error (I'm not sure if I should also handle sync user error here)</p>