title: How can I use refresh token
body: <p>I have a get refresh token api like this <code>http://token.net/api/auth/refresh-token</code> . I want to use it in my login function but to be honest I don't know anything about refresh tokens. how can I implement the refresh token into this.</p>
  <p>LoginAuth.js</p>
  <pre class="lang-js prettyprint-override"><code>export const useLogin = () =&gt; {
  
      const LoginAuth = async (data: AuthenticationProps) =&gt; {
          await axios.post(`client.com/auth/login`,
          {
              email: data.email,
              password: data.password,
          },
          {
              headers: {
                  &quot;Content-Type&quot;: &quot;application/json&quot;,
                  Accept: &quot;application/json&quot;,
              }
          }
          )
          .then((res) =&gt; {
              if(res.status === 200) {
                  console.log(&quot;works&quot;);
              }
          }, (err) =&gt; {
              console.log(err);
          })
          
      }
      return {
          LoginAuth,
      }
  }
  </code></pre>