diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index 61fa8dcb75..67ca15e295 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -1,7 +1,7 @@ mod update_notification; use anyhow::{anyhow, Context, Result}; -use client::{Client, TelemetrySettings, ZED_APP_PATH, ZED_APP_VERSION, ZED_SECRET_CLIENT_TOKEN}; +use client::{Client, TelemetrySettings, ZED_APP_PATH, ZED_APP_VERSION}; use db::kvp::KEY_VALUE_STORE; use db::RELEASE_CHANNEL; use gpui::{ @@ -248,9 +248,7 @@ impl AutoUpdater { ) })?; - let mut url_string = format!( - "{server_url}/api/releases/latest?token={ZED_SECRET_CLIENT_TOKEN}&asset=Zed.dmg" - ); + let mut url_string = format!("{server_url}/api/releases/latest?asset=Zed.dmg"); cx.update(|cx| { if let Some(param) = cx .try_global::() diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 3a48fdba86..844c9a5eb6 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -68,7 +68,6 @@ lazy_static! { std::env::var("ZED_ALWAYS_ACTIVE").map_or(false, |e| e.len() > 0); } -pub const ZED_SECRET_CLIENT_TOKEN: &str = "618033988749894"; pub const INITIAL_RECONNECTION_DELAY: Duration = Duration::from_millis(100); pub const CONNECTION_TIMEOUT: Duration = Duration::from_secs(5); diff --git a/crates/client/src/telemetry.rs b/crates/client/src/telemetry.rs index 3412910705..824ac3f9ea 100644 --- a/crates/client/src/telemetry.rs +++ b/crates/client/src/telemetry.rs @@ -1,6 +1,6 @@ mod event_coalescer; -use crate::{TelemetrySettings, ZED_SECRET_CLIENT_TOKEN, ZED_SERVER_URL}; +use crate::{TelemetrySettings, ZED_SERVER_URL}; use chrono::{DateTime, Utc}; use futures::Future; use gpui::{AppContext, AppMetadata, BackgroundExecutor, Task}; @@ -51,7 +51,6 @@ lazy_static! { #[derive(Serialize, Debug)] struct EventRequestBody { - token: &'static str, installation_id: Option>, session_id: Option>, is_staff: Option, @@ -527,7 +526,6 @@ impl Telemetry { { let state = this.state.lock(); let request_body = EventRequestBody { - token: ZED_SECRET_CLIENT_TOKEN, installation_id: state.installation_id.clone(), session_id: state.session_id.clone(), is_staff: state.is_staff.clone(), diff --git a/crates/feedback/src/feedback_modal.rs b/crates/feedback/src/feedback_modal.rs index 80722580b7..99c96fe880 100644 --- a/crates/feedback/src/feedback_modal.rs +++ b/crates/feedback/src/feedback_modal.rs @@ -2,7 +2,7 @@ use std::{ops::RangeInclusive, sync::Arc, time::Duration}; use anyhow::{anyhow, bail}; use bitflags::bitflags; -use client::{Client, ZED_SECRET_CLIENT_TOKEN, ZED_SERVER_URL}; +use client::{Client, ZED_SERVER_URL}; use db::kvp::KEY_VALUE_STORE; use editor::{Editor, EditorEvent}; use futures::AsyncReadExt; @@ -46,7 +46,6 @@ struct FeedbackRequestBody<'a> { installation_id: Option>, system_specs: SystemSpecs, is_staff: bool, - token: &'a str, } bitflags! { @@ -305,7 +304,6 @@ impl FeedbackModal { installation_id, system_specs, is_staff: is_staff.unwrap_or(false), - token: ZED_SECRET_CLIENT_TOKEN, }; let json_bytes = serde_json::to_vec(&request)?; let request = Request::post(feedback_endpoint) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index b251453670..6486fc5db4 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -493,7 +493,6 @@ struct Panic { #[derive(Serialize)] struct PanicRequest { panic: Panic, - token: String, } static PANIC_COUNT: AtomicU32 = AtomicU32::new(0); @@ -657,11 +656,7 @@ async fn upload_previous_panics( }); if let Some(panic) = panic { - let body = serde_json::to_string(&PanicRequest { - panic, - token: client::ZED_SECRET_CLIENT_TOKEN.into(), - }) - .unwrap(); + let body = serde_json::to_string(&PanicRequest { panic }).unwrap(); let request = Request::post(&panic_report_url) .redirect_policy(isahc::config::RedirectPolicy::Follow) @@ -727,10 +722,6 @@ async fn upload_previous_crashes( let request = Request::post(&crash_report_url) .redirect_policy(isahc::config::RedirectPolicy::Follow) .header("Content-Type", "text/plain") - .header( - "Authorization", - format!("token {}", client::ZED_SECRET_CLIENT_TOKEN), - ) .body(body.into())?; let response = http.send(request).await.context("error sending crash")?;