From c79d45a37f4140bd3635146652dea14ecfb04d6d Mon Sep 17 00:00:00 2001 From: Matt Barclay Date: Thu, 6 Aug 2020 19:52:48 -0700 Subject: [PATCH] Send content_type: "application/x-www-form-urlencoded" with request_token and access_token --- lib/oauth/controllers/provider_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/oauth/controllers/provider_controller.rb b/lib/oauth/controllers/provider_controller.rb index c61fcc3a..00d35f3f 100644 --- a/lib/oauth/controllers/provider_controller.rb +++ b/lib/oauth/controllers/provider_controller.rb @@ -17,7 +17,7 @@ def self.included(controller) def request_token @token = current_client_application.create_request_token params if @token - render :text => @token.to_query + render :text => @token.to_query, :content_type => "application/x-www-form-urlencoded" else render :nothing => true, :status => 401 end @@ -26,7 +26,7 @@ def request_token def access_token @token = current_token && current_token.exchange! if @token - render :text => @token.to_query + render :text => @token.to_query, :content_type => "application/x-www-form-urlencoded" else render :nothing => true, :status => 401 end