Reputation: 21
I am trying to rescue_from a JWT::DecodeError caused by an invalid token when signing out using devise. But it's not working. I keep getting a JWT::DecodeError. Sessions controller:
class SessionsController < Devise::SessionsController
rescue_from JWT::DecodeError do |exception|
render json: { response: "Token is invalid!" }, status: :bad_request
end render
end
Upvotes: 1
Views: 733