module DoorkeeperHub class CallbacksController < ActionController::Base def activation return if params[:access_token] != ENV['SERVICE_TOKEN'] # {name, access_token, doorkeeper_token, active, options} company = Company.find_or_initialize_by(doorkeeper_token: params[:doorkeeper_token]) company.update active: params[:active], name: params[:name] render body: nil end end end