Hago todo lo que encontré en stackoverflow... pero no me funciona...
te muestro un ejemplo..
Hago esto en mi paquete.json en Frontend:
"scripts": { "start": "set HTTPS=true && react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },Y ese sería mi inicio de sesión de acción de usuario pero no funciona:
export const login = (userID, password) => async (dispatch) => { try { dispatch({ type: USER_LOGIN_REQUEST }); const url = "https://localhost/authenticate/"; const response = await axios.post( url, { withCredentials: true, headers: { Accept: "application/json", "Content-Type": "application/json", }, }, { auth: { username: userID, password, }, } ); const config = { auth: { username: userID, password, }, };En mi backend sería de esta manera y funciona:
### POST https://localhost:443/authenticate/ Authorization: Basic YWRtaW46MTIzel error:
POST https://localhost/authenticate/ net::ERR_CERT_INVALID