From e498372072fe1eda4515e8b9422e12043cec00dc Mon Sep 17 00:00:00 2001 From: Leo dev Date: Mon, 13 Oct 2025 22:48:15 +0200 Subject: [PATCH] Hopefully fixed domain --- src/lib/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 59fc52f..ad1bd2f 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -19,16 +19,16 @@ export async function makeAddress(ip: string, defaultPort = 7080) { } export default async function auth( - address: string, + ip: string, wsRef: RefObject, setServer: Dispatch>, setMessages: Dispatch>, onNewMessage?: (m: Message) => void ) { - const ip = await makeAddress(address); console.log("Authenticating with server at:", ip); const server_auth = ( - (await axios.post("/api/auth", { server_ip: ip })).data as any + (await axios.post("/api/auth", { server_ip: await makeAddress(ip) })) + .data as any ).token; // Open the WebSocket connection