Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unauthorized error (401) when trying to access wishlist API #6

Open
coldicedcoffee opened this issue Oct 17, 2024 · 0 comments
Open
Labels
backend bug Something isn't working frontend

Comments

@coldicedcoffee
Copy link
Contributor

Whenever a request is made to /api/projects/wishlist/, a 401 Unauthorized error is returned. This seems to be caused by the authentication token not being properly sent or recognized by the backend.

Steps to Reproduce:
Screenshot 2024-10-17 134322

Navigate to the Wishlist page on the frontend.
The frontend attempts to send a GET request to /api/projects/wishlist/.
The backend responds with a 401 Unauthorized error.

Expected Behavior: The request should send the JWT token stored in cookies, authenticate the user, and return the appropriate response (wishlist data).

Actual Behavior:
The request fails with a 401 Unauthorized error. It seems that the JWT token is either missing from the request or not being processed correctly on the backend.

Additional Context:
The frontend uses Axios to make the request with withCredentials enabled, but the token might not be sent due to the cookie being HttpOnly (just a guess) .
CORS and credentials settings have been configured on the backend.

@coldicedcoffee coldicedcoffee added bug Something isn't working backend frontend labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working frontend
Projects
None yet
Development

No branches or pull requests

1 participant