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
By default, fetch won't send or receive any cookies from the server, resulting in unauthenticated requests if the site relies on maintaining a user session (to send cookies, the credentials init option must be set).
Since Aug 25, 2017. The spec changed the default credentials policy to same-origin.
Are you testing in Chrome? If so, you need to have the credentials: 'include' or credentials: 'same-origin' set. Here's a video explaining it. You can also refer to the Request.credentials docs.
Is there a way to pass cookies with requests?
In axios, for example, one would do someting like this:
And, using Fetch Api:
Is there an option to send and recieve cookies to/from the server?
The text was updated successfully, but these errors were encountered: