nejdetkadir / devise-api

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
MIT License
152 stars 22 forks source link

Fix dbl render error on revoked token #33

Closed samuelboland closed 10 months ago

samuelboland commented 10 months ago

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.