basic auth encoded in base64
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user