From 961b6d49774620df5c5712d02684baa40003f92c Mon Sep 17 00:00:00 2001 From: Artur Gubaidullin Date: Mon, 25 Nov 2024 11:39:11 +0500 Subject: [PATCH 1/2] Update building-a-login-with-github-button-with-a-github-app.md Remove unnecessary body from http get request --- .../building-a-login-with-github-button-with-a-github-app.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md b/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md index bece6a905020..0def7f49a1ef 100644 --- a/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md +++ b/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md @@ -340,12 +340,10 @@ def user_info(token) uri = URI("{% data variables.product.rest_url %}/user") result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - body = {"access_token" => token}.to_json - auth = "Bearer #{token}" headers = {"Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => auth} - http.send_request("GET", uri.path, body, headers) + http.send_request("GET", uri.path, nil, headers) end parse_response(result) From 66eb58fd4804da8f518d2366f33eb9fc5003de47 Mon Sep 17 00:00:00 2001 From: Artur Gubaidullin Date: Mon, 25 Nov 2024 12:02:39 +0500 Subject: [PATCH 2/2] Update building-a-login-with-github-button-with-a-github-app.md Remove unnecessary body from http get request --- .../building-a-login-with-github-button-with-a-github-app.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md b/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md index 0def7f49a1ef..23dc0f880617 100644 --- a/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md +++ b/content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md @@ -257,12 +257,10 @@ These steps lead you through writing code to generate a user access token. To sk uri = URI("{% data variables.product.rest_url %}/user") result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - body = {"access_token" => token}.to_json - auth = "Bearer #{token}" headers = {"Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => auth} - http.send_request("GET", uri.path, body, headers) + http.send_request("GET", uri.path, nil, headers) end parse_response(result)