Create a Refresh Token Feature in your Strapi Application

I had this working locally however after deploying and ensuring permissions etc configured under roles are correct I am getting a 401 error on the refresh endpoint. any suggestions?