Replies: 1 comment
-
The If you want to cause a redirect that performs a document reload you can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case: I want to store a refresh_token cookie only in
/login
url, so it's not sent on any other path:And every time I navigate and get a token expired error I want to execute:
But the problemm is: if the user is navigating, this
redirect("/login")
doesn't trigger a redirect to/login
path, it goes to/login.data
, so that session cookie is not included:I was about to submit a discussion for adding the ability to
redirect()
to perform document reloads... But it turns out that the feature exists and it's not documented anywhere 😓: #10705Adding
"X-Remix-Reload-Document"
header fixed my issue. I think it would be very helpful for other people to find this in the docs.Beta Was this translation helpful? Give feedback.
All reactions