module DoorkeeperHub class CallbacksController < ActionController::Base def activation return if params[:access_token] != DoorkeeperHub.config.service_token # {name, access_token, doorkeeper_token, active, options} record = DoorkeeperHub.config.scope_model.find_or_initialize_by( DoorkeeperHub.token_name => params[DoorkeeperHub.token_name] ) record.update active: params[:active], name: params[:name] render body: nil end end end