From f08fdc682b52d040ff94f1e7d907ed911b58ebbd Mon Sep 17 00:00:00 2001 From: rockyeverlast Date: Thu, 3 Apr 2025 14:58:15 +0530 Subject: [PATCH] basic auth encoded in base64 --- src/Pages/Login.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Pages/Login.tsx b/src/Pages/Login.tsx index a023088..7b9077f 100644 --- a/src/Pages/Login.tsx +++ b/src/Pages/Login.tsx @@ -46,7 +46,8 @@ const Login = () => { // Encode Basic Auth Credentials const username = import.meta.env.VITE_USER_NAME || ""; // Replace with actual username const password = import.meta.env.VITE_PASSWORD || ""; // Replace with actual password - const basicAuth = `${username}:${password}`; // Encode to Base64 + const credentials = `${username}:${password}`; // Encode to Base64 + const basicAuth = btoa(credentials); // Use btoa for Base64 encoding try { const res = await axios.post(