mirror of
https://github.com/a-mayb3/godo-launcher.git
synced 2026-03-21 18:05:39 +01:00
Removed unstable methods and added missing parameter in auth.get_device_auth_from().
This commit is contained in:
parent
b9bc170013
commit
1e35e945b4
1 changed files with 4 additions and 4 deletions
|
|
@ -132,7 +132,7 @@ impl DeviceCredentials {
|
|||
_ => { error!("Failed to get device_id!"); },
|
||||
}
|
||||
}
|
||||
pub fn get_device_auth_from(&mut self, access_token: &str, account_id: &str) {
|
||||
pub fn get_device_auth_from(&mut self, http_client: &Client, access_token: &str, account_id: &str) {
|
||||
|
||||
if access_token.is_empty() || account_id.is_empty() {
|
||||
error!("Device access token cannot be empty!");
|
||||
|
|
@ -140,7 +140,7 @@ impl DeviceCredentials {
|
|||
}
|
||||
|
||||
let mut url : String = String::from("https://account-public-service-prod.ol.epicgames.com/account/api/public/account/");
|
||||
url.push_str(account_id.as_str());
|
||||
url.push_str(account_id);
|
||||
url.push_str("/deviceAuth");
|
||||
|
||||
/*
|
||||
|
|
@ -166,10 +166,10 @@ impl DeviceCredentials {
|
|||
}
|
||||
|
||||
let mut bearer_header = String::from("Bearer ");
|
||||
bearer_header.push_str(access_token.as_str());
|
||||
bearer_header.push_str(access_token);
|
||||
|
||||
let response = Client::post(&http_client, url)
|
||||
.header("Authorization", bearer_header.as_str())
|
||||
.header("Authorization", bearer_header)
|
||||
.send();
|
||||
|
||||
match response {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue