feat: revoke OAuth token when logging out
This commit is contained in:
parent
d452af4fb7
commit
62f8a9210c
2 changed files with 70 additions and 7 deletions
|
|
@ -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(())
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue