I have received access token and refresh token on login and saved it in local storage. I want to send refresh token for subsequent API request when Access token expires in react. I am getting 401 error 'jwt expired'
const accessToken = localStorage.getItem('accessToken')
const headerToken = {headers:{'authorization':`Bearer ${accessToken}`, 'Accept' : 'application/json',
'Content-Type': 'application/json'}}
const getAllProducts = async ()=>{
const response = await axios.get(`${url}/ getProducts`,headerToken)
}