title: How can i get jwt refreshtoken in redux-saga?
body: <p>i'm using jwt token</p>
  <p>Assume that accesstoken and refreshtoken are already saved when logging in.</p>
  <p>getPostAPI is an API that imports post data and refreshAPI is a reissue of acesstoken.</p>
  <p>Before the accesstoken expires, if i make a getPostAPI request, it responds well, but when the accesstoken expires, a 403 error occurs. At this time, when err is detected in catch (err) of getPost function, refreshAPI is executed through REFRESH_REQUEST, and when accesstoken is issued, it is saved in AsyncStorage, and then GETPOST_REQUEST is executed to execute getPostAPI to get a good response.</p>
  <p>But I'm not sure if the method I used is the right way.</p>
  <p>am i doing right way?</p>
  <p>this is my code</p>
  <pre><code>    function getPostAPI(data) {
        return axiosInstace.post('/kakao/getpost', data);
      }
  
      function* getPost(action) {
        try {
          const result = yield call(getPostAPI, action.data);
          yield put({
            type: GETPOST_SUCCESS,
            data: result.data,
          });
        } catch (err) {
          yield put({
            type: REFRESH_REQUEST,
          });
          yield put({
            type: GETPOST_REQUEST,
            data: action.data,
          });
        }
      }
  
      function refreshAPI() {
        return axiosInstace.post('/kakao/refresh');
      }
  
      function* refresh() {
        try {
          const result = yield call(refreshAPI);
          AsyncStorage.setItem('accesstoken', `${result.data.accessToken}`, () =&gt; {});
          yield put({
            type: REFRESH_SUCCESS,
            data: result.data,
          });
        } catch (err) {
          yield put({
            type: REFRESH_FAILURE,
            error: err.response.data,
          });
        }
      }
  </code></pre>