I have been using the devise gem with rails to implement user authentication for may applications. When implementing authentication though API requests, then I turn to the devise-jwt gem. I faced an issue when implementing refresh tokens with devise, as devise does not support access tokens. I still needed the superior authentication that devise provides, but needed to manually work with fresh tokens. After looking around the web, here is how I was able to modify the code to implement refresh tokens with devise-jwt.
Take for the example a user model to sore the user email and password.