diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 16:27:35 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 16:27:35 +0200 |
| commit | 5a4c4b9fa0df891fcdd9beee18be0db4a45da701 (patch) | |
| tree | b467a1bd5706643b77962e7a82d651a803bfc436 /crates/turtle/src/command/client/account/login.rs | |
| parent | chore(server): Simplify the database support (diff) | |
| download | atuin-5a4c4b9fa0df891fcdd9beee18be0db4a45da701.zip | |
chore(server): Remove the last remnants of the "hub" sync-server thingy
Diffstat (limited to 'crates/turtle/src/command/client/account/login.rs')
| -rw-r--r-- | crates/turtle/src/command/client/account/login.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crates/turtle/src/command/client/account/login.rs b/crates/turtle/src/command/client/account/login.rs index 1ec0293a..e9513879 100644 --- a/crates/turtle/src/command/client/account/login.rs +++ b/crates/turtle/src/command/client/account/login.rs @@ -5,7 +5,7 @@ use eyre::{Context, Result, bail}; use tokio::{fs::File, io::AsyncWriteExt}; use crate::atuin_client::{ - auth::{self, AuthResponse}, + auth, encryption::{decode_key, load_key}, record::sqlite_store::SqliteStore, record::store::Store, @@ -67,15 +67,10 @@ impl Cmd { let client = auth::auth_client(settings).await; let response = client.login(&username, &password).await?; - match response { - AuthResponse::Success { session, .. } => { - Settings::meta_store().await?.save_session(&session).await?; - } - AuthResponse::TwoFactorRequired => { - // Legacy server doesn't support 2FA, so this shouldn't happen. - bail!("unexpected two-factor requirement from legacy server"); - } - } + Settings::meta_store() + .await? + .save_session(&response.session) + .await?; println!("Logged in!"); Ok(()) |
