From 034de255843c3e939cac5d7b1babd04f062a0c90 Mon Sep 17 00:00:00 2001 From: Vitor Date: Wed, 24 Jun 2026 15:46:58 -0300 Subject: [PATCH] fix(checkout): skip AccountForm when passport session is invalid isUserIdentified now requires ecomPassport.checkLogin() in addition to a Vuex email, preventing the component from jumping directly to AccountForm when customer.main_email is stale from a previous SPA interaction. Also fixes the customer.main_email watcher to reset isUserIdentified and customerEmail when the email is cleared, so the state cannot get stuck in a truthy value during the same session. Co-Authored-By: Claude Sonnet 4.6 --- @ecomplus/storefront-app/src/components/js/EcCheckout.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/@ecomplus/storefront-app/src/components/js/EcCheckout.js b/@ecomplus/storefront-app/src/components/js/EcCheckout.js index b1b4d60f3..c1b73904f 100644 --- a/@ecomplus/storefront-app/src/components/js/EcCheckout.js +++ b/@ecomplus/storefront-app/src/components/js/EcCheckout.js @@ -18,6 +18,7 @@ import { } from '@ecomplus/utils' import ecomCart from '@ecomplus/shopping-cart' +import ecomPassport from '@ecomplus/passport-client' import scrollToElement from '#components/js/helpers/scroll-to-element' import baseModulesRequestData from '../../lib/base-modules-request-data' import DiscountApplier from '#components/DiscountApplier.vue' @@ -148,7 +149,7 @@ export default { checkoutAppId: 1, toCheckoutStep: this.checkoutStep, customerEmail: this.customer.main_email, - isUserIdentified: Boolean(this.customer.main_email), + isUserIdentified: Boolean(this.customer.main_email) && ecomPassport.checkLogin(), editAccount: false, editShippingService: !this.shippingService, localZipCode: this.shippingZipCode, @@ -389,6 +390,9 @@ export default { 'customer.main_email' (email) { if (email) { this.customerEmail = email + } else { + this.customerEmail = '' + this.isUserIdentified = false } },