fix: Include cookie headers on session fetch #971
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
N/a
I can complete more if required, but I believe this to be a fix. When refreshing a local session from the client-side, the cookie headers are passed to the
getSession
endpoint. However on server-side requests these are missed off. This change introduces continuity.The issue I faced was that I also have a session initialised with an identifier in a cookie. This identifier allows me to get the user session, and get a secure stored refresh token which is only available server-side to then refresh the user JWT token automatically. I can post this refresh token to my API to generate a new JWT token. But I need to be able to retrieve the session.
❓ Type of change
📚 Description
📝 Checklist