Skip to content

Commit

Permalink
auth: use github app instead of oauth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
raine committed Aug 26, 2023
1 parent 6e12461 commit 4a5551c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ghtool/src/github/auth_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -53,7 +53,7 @@ impl GithubAuthClient {
}

pub async fn get_device_code(&self) -> Result<CodeResponse> {
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(&params).send().await?;
Expand Down

0 comments on commit 4a5551c

Please sign in to comment.