I have a react app and a server (nodejs), both are deployed on AWS and CORS policy is set on the server.
Now that I have set up protection on my server routes, I can’t seem to access these routes from my react app.
I get 401 Unauthorized
error.
And when I set the withCredentials: true
property, I get another error ERR_NETWORK
with no explanation.
However, the protected routes can be accessed from postman when signing and sending the session cookie.
I have tried looking for solutions, and all point to the withCredentials
property, which I also tried and did not help.