aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/auth.rs
diff options
context:
space:
mode:
author苏向夜 <46275354+fu050409@users.noreply.github.com>2026-01-19 11:06:38 +0800
committerGitHub <noreply@github.com>2026-01-19 11:06:38 +0800
commitf5560d7e8abe4a41c5f959cb6eb888f6aef6ca65 (patch)
treef3675bdb552a79ddb4601ccf2f5ddd81eb47c9fb /src-tauri/src/core/auth.rs
parentee767338d6db510ef15d6b8cc11f6fb9a6215a43 (diff)
parentbdff2175a8470accdab030b3931406495c56074d (diff)
downloadDropOut-f5560d7e8abe4a41c5f959cb6eb888f6aef6ca65.tar.gz
DropOut-f5560d7e8abe4a41c5f959cb6eb888f6aef6ca65.zip
Merge branch 'main' into chore/migrate-repository
Diffstat (limited to 'src-tauri/src/core/auth.rs')
-rw-r--r--src-tauri/src/core/auth.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src-tauri/src/core/auth.rs b/src-tauri/src/core/auth.rs
index ac5904c..d5e6c17 100644
--- a/src-tauri/src/core/auth.rs
+++ b/src-tauri/src/core/auth.rs
@@ -6,9 +6,9 @@ use uuid::Uuid;
// This is critical because Microsoft's WAF often blocks requests without a valid UA
fn get_client() -> reqwest::Client {
reqwest::Client::builder()
- .user_agent("DropOut/1.0 (Linux)")
+ .user_agent("DropOut/1.0")
.build()
- .unwrap_or_else(|_| get_client())
+ .unwrap_or_else(|_| reqwest::Client::new())
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -136,7 +136,6 @@ pub async fn refresh_microsoft_token(refresh_token: &str) -> Result<TokenRespons
}
/// Check if a Microsoft account token is expired or about to expire
-#[allow(dead_code)]
pub fn is_token_expired(expires_at: i64) -> bool {
let now = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)