Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add token in graphql clients #63

Merged

Conversation

Rudge
Copy link
Contributor

@Rudge Rudge commented Nov 29, 2023

What problem is this solving?

We found some apps that don't pass the token to call graphql queries or mutations. So we need a guarantee to have all integrations send the token, and we will block unauthenticated requests from the app provider.

How to test it?

  • Add some items in to the cart
  • Go to checkout
  • Check the request for API _v/private/b2b-checkout-settings/

Workspace

Screenshots or example usage:

image

Describe alternatives you've considered, if any.

I tried to keep the sessionToken, but the apps didn't recognize it, so I used the same structure of API io-clients, got some token, and set it as VtexIdclientAutCookie.

Copy link

vtex-io-ci-cd bot commented Nov 29, 2023

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

vtex-io-docs-bot bot commented Nov 29, 2023

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 🎉🎉

Copy link

github-actions bot commented Nov 29, 2023

Warnings
⚠️

Looks like this PR is too large [:bulb: smaller PRs are easy to review and approve]

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 396, PR deletions = 364

Generated by 🚫 dangerJS against 8f3e5d8

@Rudge Rudge requested a review from a team November 29, 2023 01:19
Copy link
Contributor

@mairatma mairatma left a comment

Choose a reason for hiding this comment

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

Awesome that we're making sure to pass the auth tokens here 👏

node/clients/StorefrontPermissions.ts Show resolved Hide resolved
node/resolvers/Routes/queries.ts Show resolved Hide resolved
node/clients/index.ts Show resolved Hide resolved
manifest.json Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@Rudge Rudge force-pushed the feature/B2BTEAM-1265-add-token-on-b2b-organization-request branch from 32b81c2 to 07b23ee Compare November 29, 2023 14:49
@Rudge Rudge requested review from a team and mairatma November 29, 2023 15:07
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

30.8% 30.8% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@Rudge Rudge merged commit 1f8d580 into master Nov 30, 2023
13 checks passed
@Rudge Rudge deleted the feature/B2BTEAM-1265-add-token-on-b2b-organization-request branch November 30, 2023 14:33
Copy link

vtex-io-ci-cd bot commented Nov 30, 2023

Your PR has been merged! App is being published. 🚀
Version 1.10.1 → 1.11.0

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 [email protected]

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