mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 22:46:15 +01:00
Impliment getting app token
This commit is contained in:
@@ -3,6 +3,7 @@ use std::env;
|
||||
use isideload::{
|
||||
anisette::remote_v3::RemoteV3AnisetteProvider, auth::apple_account::AppleAccountBuilder,
|
||||
};
|
||||
use plist_macro::pretty_print_dictionary;
|
||||
use tracing::Level;
|
||||
use tracing_subscriber::FmtSubscriber;
|
||||
|
||||
@@ -36,8 +37,15 @@ async fn main() {
|
||||
.login(apple_password, get_2fa_code)
|
||||
.await;
|
||||
|
||||
match account {
|
||||
match &account {
|
||||
Ok(a) => println!("Logged in. {}", a),
|
||||
Err(e) => eprintln!("Failed to log in to Apple ID: {:?}", e),
|
||||
}
|
||||
|
||||
let app_token = account.unwrap().get_app_token("xcode.auth").await;
|
||||
|
||||
match app_token {
|
||||
Ok(t) => println!("App token: {}", pretty_print_dictionary(&t)),
|
||||
Err(e) => eprintln!("Failed to get app token: {:?}", e),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user