Skip to content

@shopify/hydrogen@2025.7.2

Latest

Choose a tag to compare

@shopify-github-actions-access shopify-github-actions-access released this 13 Jan 22:15
· 11 commits to main since this release
bc50a2d

Patch Changes

  • Fixed build failures in Cloudflare Workers and Mini-Oxygen environments caused by Node.js-specific imports in virtual routes module. (#3267) by @darintanakaFN

  • Adds two new optional parameters to the customerAccount.login() method for more control over the authentication flow: (#3358) by @lihaokx

    acrValues

    Specifies Authentication Context Class Reference values, which can be used to request specific authentication methods or identity providers. When provided, it's passed as the acr_values query parameter to the OAuth authorization URL.

    Common use case: Triggering social login flows (e.g., 'provider:google' to initiate Google sign-in).

    loginHint

    Pre-populates the login form with an email address. When provided, it's passed as the login_hint query parameter to the OAuth authorization URL.

    Common use case: Streamlining the login experience when you already know the user's email from a previous interaction.

    Usage

    // Trigger Google social login
    await context.customerAccount.login({
      acrValues: 'provider:google',
    });
    
    // Pre-fill email on login form
    await context.customerAccount.login({
      loginHint: 'customer@example.com',
    });
    
    // Combine with existing options
    await context.customerAccount.login({
      countryCode: context.storefront.i18n.country,
      acrValues: 'provider:google',
      loginHint: 'customer@example.com',
    });

    Migration

    This is a non-breaking change. Both parameters are optional and existing implementations will continue to work without modification.