diff options
| author | 2026-01-18 12:41:05 +0800 | |
|---|---|---|
| committer | 2026-01-18 12:41:05 +0800 | |
| commit | dbf781a35b96252e0199fec4337515651e49a8f6 (patch) | |
| tree | 30b888202a82a28dbd480340ab231af411037913 /src-tauri/src/core/auth.rs | |
| parent | fd00ac6878b2cee9337b9e92d0c990ecdce9a346 (diff) | |
| parent | d78520b74ee7b01db633035c9c8d33ee809ba04d (diff) | |
| download | DropOut-dbf781a35b96252e0199fec4337515651e49a8f6.tar.gz DropOut-dbf781a35b96252e0199fec4337515651e49a8f6.zip | |
Merge pull request #59 from HsiangNianian/main
Diffstat (limited to 'src-tauri/src/core/auth.rs')
| -rw-r--r-- | src-tauri/src/core/auth.rs | 5 |
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) |