Skip to content

[STR-788] fix: validate user authentication by API instead of cookie#627

Merged
iago1501 merged 8 commits intomasterfrom
feat/getAuthenticatedUser
Dec 18, 2025
Merged

[STR-788] fix: validate user authentication by API instead of cookie#627
iago1501 merged 8 commits intomasterfrom
feat/getAuthenticatedUser

Conversation

@iago1501
Copy link
Copy Markdown
Contributor

What problem is this solving?

This PR improves the authentication flow by using the getAuthenticatedUser GraphQL query from store-graphql to reliably detect if a user is logged in.

Also reverted the last commit that caused a breaking change in required prop from store.login:login-content

How to test it?

  • Log in with two different browsers (eg, Firefox and Chrome)
  • Go to the My account page and disconnect one browser's session
  • Go to my account page again in a disconnected browser
  • It's expected that you will be redirected to the login session

Workspace

Related to / Depends on

store-graphql:684

How does this PR make you feel? 🔗

@iago1501 iago1501 self-assigned this Oct 27, 2025
@iago1501 iago1501 requested a review from a team as a code owner October 27, 2025 17:30
@iago1501 iago1501 added the bug Something isn't working label Oct 27, 2025
@iago1501 iago1501 removed the request for review from a team October 27, 2025 17:30
@iago1501 iago1501 added the enhancement New feature or request label Oct 27, 2025
@vtex-io-ci-cd
Copy link
Copy Markdown
Contributor

vtex-io-ci-cd bot commented Oct 27, 2025

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

vtex-io-docs-bot bot commented Oct 27, 2025

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

@iago1501 iago1501 changed the title fix: validate user authentication by API instead of cookie [STR-788] fix: validate user authentication by API instead of cookie Oct 27, 2025
@iago1501 iago1501 requested review from rafaelnader and rafarubim and removed request for leo-prange-vtex November 12, 2025 20:02
Copy link
Copy Markdown
Contributor

@rafarubim rafarubim left a comment

Choose a reason for hiding this comment

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

Testes irados 🔝🔝🔝

@iago1501 iago1501 merged commit f622d49 into master Dec 18, 2025
8 checks passed
@iago1501 iago1501 deleted the feat/getAuthenticatedUser branch December 18, 2025 12:49
@vtex-io-ci-cd
Copy link
Copy Markdown
Contributor

vtex-io-ci-cd bot commented Dec 18, 2025

Your PR has been merged! App is being published. 🚀
Version 2.145.0 → 2.146.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 vtex.store@2.146.0

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

bug Something isn't working enhancement New feature or request hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants