Chatwoot/app/controllers/devise_overrides/token_validations_controller.rb

11 lines
294 B
Ruby
Raw Permalink Normal View History

2020-02-02 17:22:38 +00:00
class DeviseOverrides::TokenValidationsController < ::DeviseTokenAuth::TokenValidationsController
def validate_token
# @resource will have been set by set_user_by_token concern
if @resource
render 'devise/token.json'
else
render_validate_token_error
end
end
end