basic auth encoded in base64

This commit is contained in:
rockyeverlast
2025-04-03 14:58:15 +05:30
parent ab029438fb
commit f08fdc682b

View File

@@ -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(