You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to debug this on my end for the past few hours but to no success. Upon signing in with a user that I signed up with through the client, I get redirected to the signin page and there is a 401 unauthorized message in my console for the url http://localhost:3000/tasks.
It successfully signs me in with the JWT appearing in localstorage and a status in the result of 201 for the sign in request. I played around with the header in the FE to see if adding more configuration would open it up but unfortunately was not successful. I also added a configuration object to the enableCors method in the BE to see if adding authorization there would be fruitful but still nothing.
The fetchTasks axios request does not hit the back end at all. In my network tab I get a preflight with 204 status for tasks, then it goes to 401 for xhr. I've added loggers in all the endpoints of the get tasks function in the BE but don't receive any feedback in my terminal from requesting in the FE. Postman works fine with both of these requests, using the same user I created in the browser.
I cloned the repo provided for the BE with the branch "S8-bonus-frontend" with a fresh install and start to see if it was on my end somewhere but still getting unauthorized :(. I'd appreciate anything you can do to help remedy this, as I've really enjoyed the course and would love to wire it up to the FE that you are providing here. Thanks for your time and effort into making this excellent course!
The text was updated successfully, but these errors were encountered:
I have been trying to debug this on my end for the past few hours but to no success. Upon signing in with a user that I signed up with through the client, I get redirected to the signin page and there is a 401 unauthorized message in my console for the url http://localhost:3000/tasks.
It successfully signs me in with the JWT appearing in localstorage and a status in the result of 201 for the sign in request. I played around with the header in the FE to see if adding more configuration would open it up but unfortunately was not successful. I also added a configuration object to the enableCors method in the BE to see if adding authorization there would be fruitful but still nothing.
The fetchTasks axios request does not hit the back end at all. In my network tab I get a preflight with 204 status for tasks, then it goes to 401 for xhr. I've added loggers in all the endpoints of the get tasks function in the BE but don't receive any feedback in my terminal from requesting in the FE. Postman works fine with both of these requests, using the same user I created in the browser.
I cloned the repo provided for the BE with the branch "S8-bonus-frontend" with a fresh install and start to see if it was on my end somewhere but still getting unauthorized :(. I'd appreciate anything you can do to help remedy this, as I've really enjoyed the course and would love to wire it up to the FE that you are providing here. Thanks for your time and effort into making this excellent course!
The text was updated successfully, but these errors were encountered: