Skip to content

Implement cookie forwarding functionality - #695

Merged
vsseixaso merged 1 commit into
masterfrom
feat/rc-cookies-forwarding
May 11, 2026
Merged

Implement cookie forwarding functionality#695
vsseixaso merged 1 commit into
masterfrom
feat/rc-cookies-forwarding

Conversation

@tiaraju

@tiaraju tiaraju commented May 7, 2026

Copy link
Copy Markdown
Contributor

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] [2]
  • 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.

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? 🔗

![](put .gif link here - can be found under "advanced" on giphy)

@tiaraju
tiaraju requested a review from a team as a code owner May 7, 2026 22:30
@tiaraju
tiaraju requested review from RodrigoTadeuF, mendescamara and vsseixaso and removed request for a team May 7, 2026 22:30
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented May 7, 2026

Copy link
Copy Markdown
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:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented May 7, 2026

Copy link
Copy Markdown

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@tiaraju
tiaraju requested a review from jeffersontuc May 7, 2026 22:31

@vsseixaso vsseixaso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vsseixaso
vsseixaso merged commit e55ebb5 into master May 11, 2026
9 of 10 checks passed
@vsseixaso
vsseixaso deleted the feat/rc-cookies-forwarding branch May 11, 2026 17:46
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Your PR has been merged! App is being published. 🚀
Version 2.177.0 → 2.177.1

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:

vtex deploy vtex.store-graphql@2.177.1

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants