Race condition
i have a login page with a login action like this:
and an index page that checks the user:
when /login redirects to / after submitting the action, somehow / doesn't have the new cookie.
6 Replies
even when doing this it still doesn't work:
It seems the cookie is set after the page response is sent, so it cannot be set for the redirect. The usual pattern is to store a token in localStorage and add it to requests as a header.
so there's no way to fix it without using localStorage?
Not that I would know of.
fixed by changing some of the codebase
without using localStorage tho
so, this issue is completed
@Hussein can you retry with
if your action is using SingleFlightMutations I've been noticing cookies don't get used on the rendered response