Skip to content

Commit 8459115

Browse files
Update code examples in building-a-login-with-github-button-with-a-github-app.md (#35414)
Co-authored-by: Alex Nguyen <[email protected]>
1 parent 6b12aa9 commit 8459115

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

content/apps/creating-github-apps/writing-code-for-a-github-app/building-a-login-with-github-button-with-a-github-app.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,10 @@ These steps lead you through writing code to generate a user access token. To sk
257257
uri = URI("{% data variables.product.rest_url %}/user")
258258

259259
result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
260-
body = {"access_token" => token}.to_json
261-
262260
auth = "Bearer #{token}"
263261
headers = {"Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => auth}
264262

265-
http.send_request("GET", uri.path, body, headers)
263+
http.send_request("GET", uri.path, nil, headers)
266264
end
267265

268266
parse_response(result)
@@ -340,12 +338,10 @@ def user_info(token)
340338
uri = URI("{% data variables.product.rest_url %}/user")
341339

342340
result = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
343-
body = {"access_token" => token}.to_json
344-
345341
auth = "Bearer #{token}"
346342
headers = {"Accept" => "application/json", "Content-Type" => "application/json", "Authorization" => auth}
347343

348-
http.send_request("GET", uri.path, body, headers)
344+
http.send_request("GET", uri.path, nil, headers)
349345
end
350346

351347
parse_response(result)

0 commit comments

Comments
 (0)