The devise-api gem is a convenient way to add authentication to your Ruby on Rails application using the devise gem. It provides support for access tokens and refresh tokens, which allow you to authenticate API requests and keep the user's session active for a longer period of time on the client side
If the refresh token route was hit, and the token was already revoked, the code would render a JSON error, but it would not return. This meant that the gem would continue executing and eventually hit another render condition, causing a rails double render error.
If the refresh token route was hit, and the token was already revoked, the code would render a JSON error, but it would not return. This meant that the gem would continue executing and eventually hit another render condition, causing a rails double render error.
Adding a return to this case fixes the issue.