Implement cookie forwarding functionality - #695
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
|
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
What problem is this solving?
Related to #688. I've created this other one due to the recent major changes in the repo.
This pull request adds support for forwarding two additional cookies,
VtexRCSessionIdv7andVtexRCMacIdv7, to the Checkout API. These cookies are now extracted from incoming requests and included in the headers sent to the Checkout API, ensuring session continuity and improved authentication handling.Cookie forwarding improvements:
Checkoutclient to includeVtexRCSessionIdv7andVtexRCMacIdv7cookies in theCookieheader when making requests to the Checkout API. [1] [2]WithOwnerIdGraphQL directive to extractVtexRCSessionIdv7andVtexRCMacIdv7from incoming cookies and set them on the context object for downstream use.Utility and type updates:
getRcSessionIdFromCookieandgetRcMacIdFromCookieto extract the new cookies, and defined their constant names incookie.ts.CustomIOContexttype to include the new cookie values, ensuring type safety and availability throughout the codebase.Documentation:
CHANGELOG.mdto document the addition of forwarding the new cookies to the Checkout API.How to test it?
[Workspace](Link goes here!)
Screenshots or example usage:
Describe alternatives you've considered, if any.
Related to / Depends on
How does this PR make you feel? 🔗
