feat: add user_auth_logout method

This commit is contained in:
ThetaDev 2024-10-24 00:46:45 +02:00
parent 7984f9f13a
commit 9e2fe61267
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6

View file

@ -1255,6 +1255,15 @@ impl RustyPipe {
Ok(())
}
/// Log out the user and remove the OAuth token from the cache
pub async fn user_auth_logout(&self) {
{
let mut cache_token = self.inner.cache.oauth_token.write().unwrap();
*cache_token = None;
}
self.store_cache().await;
}
async fn refresh_token(&self, refresh_token: &str) -> Result<OauthToken, Error> {
tracing::debug!("refreshing OAuth token");