Hi! I'm trying to build my first Web app and I am using cookies for authentication.Basically, my React client sends the auth credentials to my REST API which verifies it and generates a token if the credentials are valid.When I inspect the network activity on chrome, the token is set on the response header of the /loginPOST request, but when I try to access a protected route after this, I get a 401 and inspecting the request reveals that the cookie was not present on the header.How do I combat this? I thought this was a CORS issue at first but I just cannot seem to solve it.
Submitted July 19, 2020 at 01:53PM by radioactive-poop
No comments:
Post a Comment