feat: add user_auth_logout method
This commit is contained in:
parent
1eecde4d6b
commit
1dcde78053
1 changed files with 9 additions and 0 deletions
|
|
@ -1255,6 +1255,15 @@ impl RustyPipe {
|
||||||
Ok(())
|
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> {
|
async fn refresh_token(&self, refresh_token: &str) -> Result<OauthToken, Error> {
|
||||||
tracing::debug!("refreshing OAuth token");
|
tracing::debug!("refreshing OAuth token");
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue