Bloomreach Commerce Accelerator Login Component
Info: This feature requires a standard or premium Bloomreach Content license. Contact Bloomreach for more information.
Overview
The LoginFormComponent is a built-in HstComponent that enables customer authentication in Bloomreach Commerce Accelerator applications.
When a visitor is not authenticated, you can display a login link. The visitor can then enter credentials to sign in as a customer for the commerce backend service.
LoginFormComponent handles the login process by calling the commerce backend REST APIs.
Component Behavior
Rendering Phase
During the rendering phase, the component's template displays input fields for the login form, such as e-mail address and password.
Action Phase
When a visitor submits the login form, LoginFormComponent performs input validation. If validation fails, the component displays error messages. If validation succeeds, the component calls the CRISP API using the configured CommerceConnector and CommerceConnectorComponent (with ID authenticateCustomer). This triggers authentication with the commerce backend service. For details about configuring the authenticateCustomer connector component, see the relevant commerce platform configuration pages supported in Bloomreach Accelerator: B2C Commerce Boot.
On successful authentication, the component stores the authenticated user's information in the HttpSession by default, using StarterStoreUserSessionAccess#setStoreUserInSession(HttpServletRequest, StoreUser). The visitor is then redirected to the page they visited before accessing the login page.
Component Configuration
The following table summarizes the component's configuration and related resources.
| Component class | com.bloomreach.commercedxp.starterstore.components.LoginFormComponent |
| Template configuration | /hst:hst/hst:configurations/starterstoreboot/hst:templates/starterstore-login-form |
| Template resource | webfile:/freemarker/hstdefault/starterstore-login-form.ftl |
| Page configuration | /hst:hst/hst:configurations/starterstoreboot/hst:pages/signin-contentpage |
| Sitemap Item configuration | /hst:hst/hst:configurations/starterstoreboot/hst:sitemap/signin |