> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Login

> Customer login page template with optional Shop Pay sign-in

## What It Does

The **Login Page** template displays when customers navigate to your store's `/account/login` page to sign in to their customer account. This template shows a login form (email + password) and optionally the "Sign in with Shop" button powered by Shop Pay for faster authentication.

Configure whether to show the "Sign in with Shop" button for streamlined login experience.

<Note>
  This is a **template section** for the customer login page. Most login functionality is standard Shopify behavior. This section controls optional Shop Pay integration only.
</Note>

## Getting Started

<Steps>
  <Step title="Access Login Page">
    Customers reach login page by clicking "Account" or "Sign In" in header navigation, or visiting `yourstore.com/account/login`.
  </Step>

  <Step title="Enable Shop Pay Login (Optional)">
    In Theme Customizer → Login template → Enable "Enable Sign in with Shop" checkbox to show Shop Pay login button.
  </Step>

  <Step title="Test Customer Login">
    Create test customer account (Admin → Customers → Add customer), then test login on storefront with email/password.
  </Step>

  <Step title="Test Shop Pay Login">
    If enabled, customers with Shop Pay accounts can click "Sign in with Shop" button for faster login (redirects to Shop Pay authentication).
  </Step>
</Steps>

## Settings

<Tabs>
  <Tab title="Section Settings">
    <AccordionGroup>
      <Accordion title="Enable Sign in with Shop" icon="shop">
        **Type:** Checkbox\
        **Default:** Disabled (unchecked)\
        **Powered by:** Shop Pay (Shopify's accelerated checkout platform)

        Controls whether "Sign in with Shop" button displays on login page.

        ### When Disabled (Default)

        * Only standard email + password login form displays
        * Customers must enter email and password manually
        * Traditional login experience (works for all customers)
        * No Shop Pay integration on login page

        ### When Enabled

        * "Sign in with Shop" button appears above or below standard login form
        * Customers with Shop Pay accounts can click button for one-tap login
        * Redirects to Shop Pay authentication (biometric or code entry on mobile)
        * After authentication, customer logged into your store automatically
        * Standard email/password form still available for non-Shop Pay customers

        ### How "Sign in with Shop" Works

        **For customers with Shop Pay:**

        1. Customer clicks "Sign in with Shop" button
        2. Redirected to Shop Pay (mobile app or web)
        3. Authenticates with Shop Pay (Face ID, fingerprint, or one-time code)
        4. Shop Pay confirms identity, returns customer to your store (logged in)
        5. Faster than typing email + password

        **For customers without Shop Pay:**

        * Button still displays, but clicking prompts to set up Shop Pay or use standard login
        * No disruption to traditional login flow (email/password form always available)

        ### Benefits of Enabling

        **Faster login:**

        * Shop Pay customers log in with one tap (biometric authentication)
        * Reduces friction vs typing email + password (especially mobile)
        * Improves conversion (customers more likely to log in if convenient)

        **Mobile-optimized:**

        * Biometric auth (Face ID, Touch ID, fingerprint) works seamlessly on mobile
        * No typing on small keyboards
        * Familiar experience (customers use Shop Pay across Shopify stores)

        **Increased trust:**

        * Shop Pay is Shopify-owned (customers trust Shopify brand)
        * Secure authentication (no password storage on your site)
        * Reduces password fatigue (customers don't need to remember your store's password)

        **Checkout acceleration:**

        * Customers logged in via Shop Pay have payment info saved
        * Faster checkout after login (Shop Pay pre-fills payment/shipping)

        ### Drawbacks of Enabling

        **Confusion for some customers:**

        * Customers unfamiliar with Shop Pay may not understand button
        * Two login options (Shop Pay + email/password) can confuse
        * May need education ("Sign in with Shop is our fast login method")

        **Requires Shop Pay account:**

        * Only useful for customers who've used Shop Pay before (checked out via Shop Pay on any Shopify store)
        * New customers won't have Shop Pay accounts (must use standard login)

        **Additional button clutter:**

        * Adds visual element to login page (more buttons = busier page)
        * Some merchants prefer clean, minimal login (email/password only)

        ### Choosing Whether to Enable

        **Enable when:**

        * Mobile-heavy traffic (Shop Pay biometric auth perfect for mobile)
        * Customers likely have Shop Pay (your store or other Shopify stores use Shop Pay checkout)
        * Priority is conversion optimization (reduce login friction)
        * Modern, tech-forward customer base (comfortable with one-tap login)

        **Disable when:**

        * Minimal, traditional login aesthetic preferred
        * Customers unfamiliar with Shop Pay (B2B, older demographics, international customers where Shop Pay less common)
        * Want simplest possible login (one form, one method)
        * Testing shows Shop Pay button doesn't improve login rate

        ### Shop Pay Requirements

        **For customers to use Shop Pay login:**

        * Customer must have used Shop Pay checkout previously (on your store or any Shopify store)
        * Shop Pay creates account first time customer uses Shop Pay at checkout
        * Account linked to customer email + phone number
        * Available in Shop Pay supported regions (primarily US, UK, Canada—check Shopify docs for current list)

        ### Testing Shop Pay Login

        **Steps to test:**

        1. Enable "Sign in with Shop" setting
        2. Create test customer account (or use existing account)
        3. Complete test purchase using Shop Pay checkout (to create Shop Pay account)
        4. Log out of customer account
        5. Go to `/account/login` page
        6. Click "Sign in with Shop" button
        7. Authenticate via Shop Pay (app or web)
        8. Verify logged into customer account successfully

        **If button doesn't appear:**

        * Verify setting enabled in Theme Customizer
        * Hard refresh browser (Cmd/Ctrl+Shift+R)
        * Check Shop Pay available in your region
        * Verify theme supports Shop Pay login (older themes may not)

        ### Shop Pay Login vs Shop Pay Checkout

        **Shop Pay Checkout:**

        * Accelerated checkout at payment step (saves payment/shipping info)
        * Configured in Shopify Admin → Settings → Payments → Shop Pay
        * Separate from login page feature

        **Shop Pay Login:**

        * Accelerated login to customer accounts (this setting)
        * Uses Shop Pay authentication for fast sign-in
        * Requires Shop Pay Checkout to be enabled (customers create Shop Pay account at checkout)

        **Both work together:**

        * Customer uses Shop Pay Checkout → Creates Shop Pay account
        * Later, customer uses Shop Pay Login → Fast authentication
        * After login, customer proceeds to Shop Pay Checkout → One-tap purchase

        ### Best Practices

        **Enable for mobile-first stores:**

        * Shop Pay biometric auth perfect for mobile (Face ID, fingerprint)
        * Desktop customers can still use standard login

        **Keep both options visible:**

        * Don't hide email/password form if Shop Pay enabled
        * Customers should always have fallback (if Shop Pay not working or unavailable)

        **Educate customers:**

        * Add help text near button ("Sign in with Shop for fast login")
        * Link to Shopify's Shop Pay info page
        * Consider tooltip or info icon explaining Shop Pay login

        **Monitor usage:**

        * Track login method usage (Shop Pay vs standard)
        * If Shop Pay button unused, consider disabling (reduces clutter)
        * If heavily used, keep enabled and promote

        **Test in your region:**

        * Shop Pay availability varies by country
        * Test with customer in your primary market
        * If Shop Pay unavailable in your region, disable setting

        **Recommendation:** Enable if your store uses Shop Pay at checkout and has mobile-heavy traffic. Disable for minimal aesthetic or if customers unlikely to have Shop Pay accounts. Test to see if button improves login conversion.
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## Best practices

<CardGroup cols={2}>
  <Card title="Enable for Mobile Shoppers" icon="mobile">
    Shop Pay login ideal for mobile-first stores. Biometric auth (Face ID, fingerprint) faster than typing password on small keyboard.
  </Card>

  <Card title="Keep Standard Login Visible" icon="envelope">
    Always show email + password form even if Shop Pay enabled. Customers need fallback if Shop Pay unavailable or unfamiliar.
  </Card>

  <Card title="Test Shop Pay Authentication" icon="vial">
    Create Shop Pay account (checkout with Shop Pay), then test "Sign in with Shop" button. Ensure authentication flow works smoothly.
  </Card>

  <Card title="Educate Customers" icon="circle-info">
    Add help text or tooltip explaining Shop Pay login ("Fast, secure login with biometric authentication"). Reduces confusion.
  </Card>

  <Card title="Monitor Usage Analytics" icon="chart-line">
    Track login method usage (Shop Pay vs standard). If Shop Pay button unused, consider disabling to simplify page.
  </Card>

  <Card title="Regional Availability" icon="globe">
    Shop Pay primarily available in US, UK, Canada. Check if available in your primary market before enabling.
  </Card>

  <Card title="Disable for Minimal Aesthetic" icon="minimize">
    If clean, simple login preferred, disable Shop Pay button. Standard email/password sufficient for most stores.
  </Card>

  <Card title="Pair with Shop Pay Checkout" icon="link">
    Shop Pay Login works best when Shop Pay Checkout enabled (customers create Shop Pay accounts during checkout).
  </Card>
</CardGroup>

## Login Page Structure

### Default Content

**Typical login page includes:**

* **Heading** - "Customer Login" or "Sign In"
* **Shop Pay button** (if enabled) - "Sign in with Shop" button
* **Login form** - Email input, Password input, "Sign In" submit button
* **"Forgot password?" link** - Links to password reset page
* **"Create account" link** - Links to registration page
* **Guest checkout option** (optional) - "Continue as guest" button (if theme supports)

### User Flow

**Standard login flow:**

1. Customer enters email + password
2. Clicks "Sign In" button
3. Redirected to account dashboard (`/account`)

**Shop Pay login flow:**

1. Customer clicks "Sign in with Shop" button
2. Redirected to Shop Pay authentication (app or web)
3. Authenticates with biometric or one-time code
4. Shop Pay verifies identity, returns to your store
5. Customer logged in, redirected to account dashboard

**Failed login:**

* Error message displays ("Incorrect email or password")
* Customer can retry or use "Forgot password?" link

## Common Use Cases

### Mobile-First Fashion Store

**Settings:** Enable "Sign in with Shop"

**Setup:** Mobile-heavy traffic, customers use Shop Pay at checkout frequently, Shop Pay login reduces mobile typing friction.

**Best for:** Fashion, apparel, beauty stores with mobile shoppers

### Traditional Login (Disable Shop Pay)

**Settings:** Disable "Sign in with Shop"

**Setup:** Minimal login page, standard email + password form only, clean aesthetic.

**Best for:** B2B stores, older demographics, regions where Shop Pay uncommon

### Conversion-Optimized Login

**Settings:** Enable "Sign in with Shop" + guest checkout button

**Setup:** Multiple login options (Shop Pay biometric, standard email/password, guest checkout). Maximize conversion by offering choice.

**Best for:** High-traffic stores prioritizing conversion optimization

### International Store (Shop Pay Unavailable)

**Settings:** Disable "Sign in with Shop"

**Setup:** Store primarily serves regions where Shop Pay unavailable (e.g., Asia, South America). Shop Pay button wouldn't function.

**Best for:** International stores outside Shop Pay supported regions

## Related Sections & Pages

* **[Account Dashboard](/themes/mojave/pages-templates/customers/account)** - Customer account page (after login)
* **[Registration Page](/themes/mojave/pages-templates/customers/register)** - Customer registration template
* **[Password Reset](/themes/mojave/pages-templates/customers/reset-password)** - Forgot password template
* **[Header](/themes/mojave/header/header)** - Navigation with "Account" link (triggers login)

## Technical Notes

### Shop Pay Integration

**API/Authentication:**

* Shop Pay login uses Shopify's authentication API
* Customer identity verified by Shop (Shopify's consumer app)
* OAuth-like flow: Your store → Shop Pay → Authentication → Return to store
* Secure (no passwords stored on your site)

**Customer Matching:**

* Shop Pay account linked to customer email + phone
* When logged in via Shop Pay, matches to customer account in your store by email
* If no matching customer account exists, creates new account (if customer registrations enabled)

### Cookie/Session Management

**Standard login:**

* Email/password form creates session cookie
* Cookie stored in browser, grants access to customer-specific pages
* Cookie expires on browser close or logout

**Shop Pay login:**

* Shop Pay authentication creates same session cookie
* Functionally identical to standard login (customer logged in, access granted)
* Cookie persists until logout or browser close

### Guest Checkout Consideration

**Some themes offer "Continue as guest":**

* Allows checkout without login/registration
* If theme supports, "Continue as guest" button may appear on login page
* Bypasses login requirement for one-time purchases

### Backwards Compatibility

**Older themes may not support Shop Pay login:**

* "Enable Sign in with Shop" setting may not exist
* Update theme to latest version for Shop Pay login support
* Or manually add Shop Pay login button (requires developer)

### Shop Pay Availability

**Supported regions (as of 2024):**

* United States
* Canada
* United Kingdom
* Expanding to more regions (check Shopify docs for current list)

**International stores:**

* If primary market outside supported regions, Shop Pay button won't function
* Disable setting (button displays but authentication fails)

## Troubleshooting

**"Sign in with Shop" button not displaying:**

* Verify "Enable Sign in with Shop" setting enabled in Theme Customizer → Login template
* Check theme supports Shop Pay login (older themes may not)
* Clear browser cache (Cmd/Ctrl+Shift+R), refresh page
* Verify Shop Pay available in your region

**Shop Pay authentication failing:**

* Check customer has Shop Pay account (used Shop Pay checkout previously)
* Verify customer's email matches email used for Shop Pay account
* Try standard login (email/password) as fallback
* Check Shopify status page for Shop Pay outages

**Customers confused by Shop Pay button:**

* Add help text or tooltip explaining Shop Pay ("Fast login with biometric authentication")
* Link to Shopify's Shop Pay info page
* Consider disabling if confusion outweighs benefit

**Shop Pay button showing but not working:**

* Shop Pay may be unavailable in customer's region
* Customer may not have Shop Pay account (must use Shop Pay checkout first to create)
* Try creating Shop Pay account (do test checkout with Shop Pay enabled), then test login

**Login page redirecting incorrectly:**

* Check customer account exists (Admin → Customers)
* Verify account not disabled (check customer status in Admin)
* Test with different customer account (may be account-specific issue)

**Standard login not working:**

* Verify email/password correct (case-sensitive)
* Check customer account active (not disabled in Admin)
* Try "Forgot password?" link to reset password
* Contact Shopify Support if persistent (may be account issue)

**Shop Pay button doesn't match theme styling:**

* Shop Pay button styled by Shopify (limited customization)
* Some CSS customization possible (requires developer)
* If styling critical, consider disabling Shop Pay button

**Mobile Shop Pay authentication not using biometric:**

* Customer may not have biometric auth enabled on device (Face ID, Touch ID, fingerprint)
* Shop Pay falls back to one-time code via SMS
* Ensure customer's phone number linked to Shop Pay account

## Key Takeaways

* **One setting only:** "Enable Sign in with Shop" checkbox (enabled = Shop Pay button displays)
* **Shop Pay login:** Fast authentication using biometric or one-time code (Shop Pay accounts)
* **Standard login always available:** Email + password form displays regardless of Shop Pay setting
* **Mobile-optimized:** Shop Pay biometric auth perfect for mobile shoppers (Face ID, Touch ID, fingerprint)
* **Requires Shop Pay account:** Customers must have used Shop Pay checkout previously (on your or any Shopify store)
* **Regional availability:** Shop Pay primarily US, UK, Canada (check Shopify docs for current regions)
* **Enable for mobile stores:** If mobile-heavy traffic and customers use Shop Pay at checkout
* **Disable for simplicity:** If minimal login preferred or customers unlikely to have Shop Pay accounts
* **Test authentication:** Create Shop Pay account, test "Sign in with Shop" button flow
* **Works with Shop Pay Checkout:** Shop Pay Login and Shop Pay Checkout complementary features

For more about Shop Pay, see [Shopify's Shop Pay documentation](https://help.shopify.com/en/manual/checkout-settings/shop-pay).
