From 4a5551cad1ba86f0b1da1c556e1a9a4b5a93e183 Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Sat, 26 Aug 2023 11:33:07 +0300 Subject: [PATCH] auth: use github app instead of oauth flow --- ghtool/src/github/auth_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghtool/src/github/auth_client.rs b/ghtool/src/github/auth_client.rs index 4596c17..5554499 100644 --- a/ghtool/src/github/auth_client.rs +++ b/ghtool/src/github/auth_client.rs @@ -8,8 +8,8 @@ pub struct GithubAuthClient { } const GITHUB_BASE_URI: &str = "https://github.com"; -// const CLIENT_ID: &str = "Iv1.1bbd5e03617adebb"; -const CLIENT_ID: &str = "32a2525cc736ee9b63ae"; +const CLIENT_ID: &str = "Iv1.1bbd5e03617adebb"; +// const CLIENT_ID: &str = "32a2525cc736ee9b63ae"; const USER_AGENT: &str = "ghtool"; const GRANT_TYPE: &str = "urn:ietf:params:oauth:grant-type:device_code"; @@ -53,7 +53,7 @@ impl GithubAuthClient { } pub async fn get_device_code(&self) -> Result { - let params = [("client_id", CLIENT_ID), ("scope", "repo")]; + let params = [("client_id", CLIENT_ID)]; let url = format!("{}/login/device/code", GITHUB_BASE_URI); info!("Requesting device code from {}", url); let res = self.client.post(url).form(¶ms).send().await?;