title: redux saga run other middleware before get into sagaMiddleware
body: <p>I have this codes:</p>
  
  <pre><code>// jwtmiddleware.js //
  
  function createJwtMiddleware() {
      return ({ dispatch, getState }) =&gt; (next) =&gt; (action) =&gt; {
          const auth = getState().auth;
          if (typeof action === 'function') {
              if (auth &amp;&amp; auth.token) {
                  const exp = jwtDecode(auth.token).exp;
  
                  const tokenExpiration = moment.unix(exp);
                  if (tokenExpiration &amp;&amp; (
                          tokenExpiration.diff(moment(), 'm') &lt;= 8
                      )) {
                      return authPromise(dispatch).then(() =&gt; setTimeout(next(action), 250));
                  }
              }
          }
  
          return next(action);
      };
  
  }
  </code></pre>
  
  <p>And put it into store.js:</p>
  
  <pre><code>const middlewares = [
      jwt,
      thunk,
      routerMiddleware(history),
      sagaMiddleware,
  ];
  const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
  
  const store = createStore(reducer, composeEnhancers(applyMiddleware(...middlewares)));
  export default store;
  </code></pre>
  
  <p>my saga:</p>
  
  <pre><code>export function menuRequest() {
      return { type: FETCH_MENU_REQUEST };
  }
  
  function fetchMenu() {
      return new Promise((resolve, reject) =&gt; {
          request.get('/menus')
              .then((response) =&gt; resolve(response))
              .catch((error) =&gt; reject(error))
      })
  }
  
  export function* handleFetchMenu() {
      try {
          const payload = yield call(fetchMenu);
  
          yield put({ type: FETCH_MENU_SUCCESS, payload });
      } catch (e) {
          yield put({ type: FETCH_MENU_FAILED, e });
      }
  }
  
  
  export function* watchMenu() {
      yield takeEvery(FETCH_MENU_REQUEST, handleFetchMenu);
  }
  </code></pre>
  
  <p>Rootsaga.js:</p>
  
  <pre><code>export default function* Root() {
      yield all([
          fork(watchLoginRequest),
          fork(watchMenu),
      ])
  }
  </code></pre>
  
  <p>the problem is it never enter to jwtmiddleware for any saga call. If I use redux thunk it runs properly. </p>
  
  <p>The flow of this code is: before saga attempt to <code>fetchMenu</code> it will check for current jwt token if its need to be refresh (will update the token) or already expired (will redirect to login page).</p>
  
  <p>is there any possible solution to make this code works? or any other flow for checking token for every call with redux saga?</p>