use plume_core::auth::Account;
use omnisette::AnisetteConfiguration;
#[tokio::main]
async fn main() -> Result<(), plume_core::Error> {
let config = AnisetteConfiguration::default();
let account = Account::login(
|| {
// Prompt user for credentials
Ok(("[email protected]".to_string(), "password".to_string()))
},
|| {
// Prompt user for 2FA code
Ok("123456".to_string())
},
config
).await?;
let (first_name, last_name) = account.get_name();
println!("Logged in as: {} {}", first_name, last_name);
Ok(())
}