From e425461a299aeb177f9f8508a29ef80d86edbfaa Mon Sep 17 00:00:00 2001 From: Leo dev Date: Mon, 13 Oct 2025 22:25:50 +0200 Subject: [PATCH] Authentication --- src/requests/auth.rs | 8 +++----- src/utils/client.rs | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/requests/auth.rs b/src/requests/auth.rs index 779e283..b1253a1 100644 --- a/src/requests/auth.rs +++ b/src/requests/auth.rs @@ -13,11 +13,9 @@ struct AuthApiRes { } pub fn auth(_server: &Arc, client: &mut Client, token: &str) -> crate::Result { - let mut res = ureq::get(format!( - "http://localhost:3000/api/auth?intents=server&token={token}" - )) - .call() - .context("Failed to authenticate")?; + let mut res = ureq::get(format!("https://vxchat.netlify.app/api/auth?token={token}")) + .call() + .context("Failed to authenticate")?; let api_res: AuthApiRes = serde_json::from_str(&res.body_mut().read_to_string()?)?; client.set_uuid(&api_res.user_id); LOGGER.info(format!("{} successfully authenticated", api_res.user_id)); diff --git a/src/utils/client.rs b/src/utils/client.rs index 180099a..051684f 100644 --- a/src/utils/client.rs +++ b/src/utils/client.rs @@ -28,7 +28,7 @@ pub mod handshake { if !request_line.starts_with("GET") { return Err(std::io::Error::new( std::io::ErrorKind::InvalidData, - "Invalid HTTP method", + format!("Invalid HTTP method: {request_line}"), )); }