aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/command/client/account/login.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/turtle/src/command/client/account/login.rs')
-rw-r--r--crates/turtle/src/command/client/account/login.rs15
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(())