mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
fix(core,cli): end the session on Proton when signing out
Logout only deleted the keyring entry, so the session's tokens stayed valid on Proton's side. It now ends the session first (DELETE auth/v4, bounded to 10 s) and signs out locally either way. `pdfs logout` says when Proton could not be reached (B233).
This commit is contained in:
1 parent
ef0f046939
commit
518763c5c9
5 files changed
+88
-7
No files matched your search
@@ -1977,8 +1977,14 @@ fn key_state_name() -> &'static str {
|
||||
}
|
||||
|
||||
fn cmd_logout() -> Result<()> {
|
||||
auth::logout()?;
|
||||
println!("Stored session cleared.");
|
||||
if auth::logout()? {
|
||||
println!("Signed out: the session is ended on Proton and cleared here.");
|
||||
} else {
|
||||
println!(
|
||||
"Stored session cleared. Proton could not be reached to end the session; \
|
||||
it stays valid until it expires or is signed out in your account's security settings."
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user