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:
committed by
Damir Jelić
parent
13ca27d66a
commit
43431b88da
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user