feat: revoke OAuth token when logging out

This commit is contained in:
ThetaDev 2024-10-24 01:30:59 +02:00
parent 304c0cf16c
commit 2040fd4e0a
2 changed files with 70 additions and 7 deletions

View file

@ -193,6 +193,8 @@ enum Commands {
Vdata,
/// Log in using your Google account
Login,
/// Log out from your Google account
Logout,
}
#[derive(Default, Copy, Clone, ValueEnum)]
@ -1226,6 +1228,10 @@ async fn run() -> anyhow::Result<()> {
}
anstream::println!("{}", "Logged in.".green());
}
Commands::Logout => {
rp.user_auth_logout().await?;
anstream::println!("{}", "Logged out.".red());
}
};
Ok(())
}