feat(sdk): Add Client::logout() to log out regardless of the auth API

It simplifies code for users, and avoids to have to match on
`AuthApi`, which is a non-exhaustive enum.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2025-04-04 12:49:03 +02:00
committed by Damir Jelić
parent 13ca27d66a
commit 43431b88da
3 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -559,7 +559,7 @@ impl OAuthCli {
/// Log out from this session.
async fn logout(&self) -> anyhow::Result<()> {
// Log out via OAuth 2.0.
self.client.oauth().logout().await?;
self.client.logout().await?;
// Delete the stored session and database.
let data_dir = self.session_file.parent().expect("The file has a parent directory");