forwarding rc cookies to checkout api - #688
Closed
tiaraju wants to merge 1 commit into
Closed
Conversation
tiaraju
requested review from
RodrigoTadeuF,
leo-prange-vtex and
vsseixaso
and removed request for
a team
April 30, 2026 18:41
Contributor
|
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
|
|
vsseixaso
pushed a commit
that referenced
this pull request
May 11, 2026
#### 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, `VtexRCSessionIdv7` and `VtexRCMacIdv7`, 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:** * Updated the `Checkout` client to include `VtexRCSessionIdv7` and `VtexRCMacIdv7` cookies in the `Cookie` header when making requests to the Checkout API. [[1]](diffhunk://#diff-0a017c0453694f2c53c4774f6261676f4692532b233e1b747bbb77b6542e259cL33-R33) [[2]](diffhunk://#diff-0a017c0453694f2c53c4774f6261676f4692532b233e1b747bbb77b6542e259cR46-R50) * Modified the `WithOwnerId` GraphQL directive to extract `VtexRCSessionIdv7` and `VtexRCMacIdv7` from incoming cookies and set them on the context object for downstream use. **Utility and type updates:** * Added utility functions `getRcSessionIdFromCookie` and `getRcMacIdFromCookie` to extract the new cookies, and defined their constant names in `cookie.ts`. * Extended the global `CustomIOContext` type to include the new cookie values, ensuring type safety and availability throughout the codebase. **Documentation:** * Updated the `CHANGELOG.md` to document the addition of forwarding the new cookies to the Checkout API. <!--- What is the motivation and context for this change? --> #### How to test it? <!--- Don't forget to add a link to a Workspace where this branch is linked --> [Workspace](Link goes here!) #### Screenshots or example usage: <!--- Add some images or gifs to showcase changes in behaviour or layout. Example: before and after images --> #### Describe alternatives you've considered, if any. <!--- Optional --> #### Related to / Depends on <!--- Optional --> #### How does this PR make you feel? [:link:](http://giphy.com/) <!-- Go to http://giphy.com/ and pick a gif that represents how this PR makes you feel --> 
Contributor
|
PR closed in favor of #695. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem is this solving?
This pull request enhances the way session-related cookies are handled and propagated throughout the checkout flow. The main change is the addition of support for two new cookies,
VtexRCSessionIdv7andVtexRCMacIdv7, which are now extracted from incoming requests and included in downstream requests to ensure proper session continuity and tracking.Session Cookie Handling Improvements:
VtexRCSessionIdv7andVtexRCMacIdv7from incoming cookies in theWithOwnerIdGraphQL directive, and stored them in the context for downstream use (node/directives/withOwnerId.ts).rcSessionIdv7andrcMacIdv7fields, ensuring type safety and clarity (node/globals.ts).Cookie Utility Enhancements:
VtexRCSessionIdv7andVtexRCMacIdv7) in the cookie utility module, centralizing cookie name management and retrieval logic (node/utils/cookie.ts). [1] [2]Checkout Client Updates:
Checkoutclient to append the new session cookies to theCookieheader in all outgoing requests, ensuring that these cookies are forwarded as needed (node/clients/checkout.ts). [1] [2]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? 🔗
