In a previous release, we improved our GraphQL Authentication implementation which added the ability for a shopper to login from their Catalyst/headless storefront and remain logged in as they proceed into the Stencil checkout page.
This document outlines step-by-step instructions to further improve that feature which allow the shopper to login (and logout) from the Stencil checkout page, and have their login state persist back to the Catalyst/headless storefront.
Use the latest Catalyst code.
Ensure you’ve merged the following pull requests:
Configure login and logout routes.
Send a request to GET a Channel Site to retrieve the site_id for your Catalyst/headless storefront.
Send a request to PUT Routes to configure the login and logout routes.
Enable storefront redirection in checkout settings.
To enable storefront redirection in checkout settings, send a request to PUT Checkout Settings to update the should_redirect_to_storefront_for_auth setting.