Replies: 1 comment
-
Im seeing that this can happen when multiple nested routes are using the protected loader. Try throwing your error redirect rather than returning it. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a Remix application that implements token refresh logic in a protected route's loader. The idea is to check the current session for an access token and a refresh token, then call a backend
/auth/refresh
endpoint when the access token is expired. When the refresh call is successful, I update the session with the new tokens. However, despite receiving new tokens from the backend, the session cookie doesn't seem to be updating with these new values.Below is an excerpt of the relevant code:
What could be the potential reasons for the session not getting updated with the new token values, even though the refresh endpoint is returning the new tokens correctly? Has anyone encountered similar issues, or does anyone see something in the above code that might be causing the session cookie not to reflect the updated values?
Any insights, debugging tips, or pointers to related documentation would be really appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions