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
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.
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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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