Doorkeeperでログイン中にエラーが発生すると、Doorkeeper::TokensControllerの中でエラーが起きるので、ApplicationController
/config/routes.rb
MyAppServer::Application.routes.draw do use_doorkeeper do controllers tokens: 'tokens' end resources :books resources :users end
/app/controllers/tokens_controller.rb
class TokensController