Skip to content

User Auth Quick Start

The User Auth drop-in handles customer authentication flows including sign-in, account creation, password reset, and email confirmation with support for both guest and registered users.

Version: 2.1.5

New to drop-ins? Start with the Using drop-ins tutorial for step-by-step guidance.

Need to customize? See the Initialization page for advanced configuration options.

Getting started

The User Auth drop-in is included in the Commerce boilerplate —no installation needed. For complete instructions on importing and using drop-ins in your blocks, see the Using drop-ins guide.

Quick reference

Import paths:

  • Initializer: import '../../scripts/initializers/auth.js'
  • Containers: import ContainerName from '@dropins/storefront-auth/containers/ContainerName.js'
  • Provider: import { render } from '@dropins/storefront-auth/render.js'

Package information:

  • Package: @dropins/storefront-auth
  • Version: 2.1.5 (verify compatibility with your Commerce instance)
  • Example container: AuthCombine

Example in boilerplate

The boilerplate includes working examples that use the User Auth drop-in. Look for blocks with names like commerce-auth (for example, commerce-cart, commerce-checkout) in the blocks/ directory.

Quick example

This example shows the basic pattern for using the User Auth drop-in. For complete details and advanced patterns, see the Using drop-ins guide.

// 1. Import initializer (handles all setup)
import '../../scripts/initializers/auth.js';
// 2. Import the container you need
import AuthCombine from '@dropins/storefront-auth/containers/AuthCombine.js';
// 3. Import the provider
import { render as provider } from '@dropins/storefront-auth/render.js';
// 4. Render in your block
export default async function decorate(block) {
await provider.render(AuthCombine, {
// Configuration options - see Containers page
})(block);
}

Next steps

Now that you understand the basics, explore these resources:

  • Using drop-ins - Complete guide with examples and patterns.
  • Containers - Available UI components and their configuration options.
  • Initialization - Customize initializer settings and data models.
  • API functions - Control drop-in behavior programmatically.
  • Slots - Extend containers with custom content.
  • Events - Listen to and respond to drop-in state changes.