diff --git a/theseus/src/api/auth.rs b/theseus/src/api/auth.rs index 36c80816f..cabeaab74 100644 --- a/theseus/src/api/auth.rs +++ b/theseus/src/api/auth.rs @@ -48,39 +48,6 @@ pub async fn refresh(user: uuid::Uuid) -> crate::Result { .as_error() })?; - let offline = *state.offline.read().await; - - if !offline { - let fetch_semaphore: &crate::util::fetch::FetchSemaphore = - &state.fetch_semaphore; - if Utc::now() > credentials.expires - && inner::refresh_credentials(&mut credentials, fetch_semaphore) - .await - .is_err() - { - users.remove(credentials.id).await?; - - return Err(crate::ErrorKind::OtherError( - "Please re-authenticate with your Minecraft account!" - .to_string(), - ) - .as_error()); - } - - // Update player info from bearer token - let player_info = - hydra::stages::player_info::fetch_info(&credentials.access_token) - .await - .map_err(|_err| { - crate::ErrorKind::HydraError( - "No Minecraft account for your profile. Please try again or contact support in our Discord for help!".to_string(), - ) - })?; - - credentials.username = player_info.name; - users.insert(&credentials).await?; - } - Ok(credentials) }