Single active storefront session per customer
Storefront customer sessions are single-active: signing a customer in again or signing them out invalidates every customer access token previously issued for that account, not just the session that triggered the change.
- One session per customer account — every sign-in method rotates the underlying session token and ends the customer’s other sessions. This covers a storefront sign-in, the Customer Login API access point URL (
/login/token/{token}), the GraphQL Storefront APIloginandloginWithCustomerLoginJwtmutations, and flows built on them, such as a B2B Edition buyer portal sign-in. Sign-out invalidates the customer access token the same way. expiresAtis a latest-possible expiry, not a guaranteed lifetime — a customer access token can stop working earlier than itsexpiresAtvalue because the customer signed in again or signed out.- Invalidated tokens do not return errors — a GraphQL request that carries an invalidated customer access token runs as an anonymous shopper: the
customerfield returnsnull, and customer-specific values such as customer-group pricing fall back to guest values. To make such requests return an explicit error instead, send theX-BC-Error-On-Invalid-Customer-Access-Tokenheader with a value oftrue. - For headless storefronts and integrations — store at most one customer access token per customer account and replace it with the newest token after each sign-in, consolidate the customer’s sign-in flows on a single method, and treat a
nullcustomerresponse as a signal to prompt the customer to sign in again.
For details, see Customer session behavior.