Version 2025-07 is the last API version to support React-based UI components. Later versions use Polaris web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the upgrade guide to upgrade your extension and avoid being blocked from updating your extension after October 1st 2026.
Require Login API
The Require Login API triggers a sign-in prompt for buyers viewing a pre-authenticated order status page. Use it to require the buyer to sign in before performing sensitive actions.
Anchor to Use casesUse cases
- Gate sensitive information: Prompt the buyer to sign in before showing detailed order data, account-specific actions, or personalized content.
- Enforce authentication for actions: Require sign-in before allowing the buyer to perform actions like initiating a return or updating their address.
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Supported targets
- customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. page. render
Anchor to PropertiesProperties
The Require Login API object provides the method. Access it on the API object to trigger a login prompt.
- Anchor to requireLoginrequire
Loginrequire Login () => Promise<void>() => Promise<void>requiredrequired Triggers a login prompt if the buyer is viewing a pre-authenticated Order status page. Returns a promise that resolves when the login prompt is dismissed or completed.
Anchor to Best practicesBest practices
- Check authentication state first: Use the Authentication State API to check whether the buyer is already authenticated before calling
requireLogin. - Don't block the initial render: Call
requireLoginin response to a buyer action, not during the initial render. This avoids unexpected login prompts when the page loads.
Anchor to LimitationsLimitations
requireLogin()only triggers a login prompt — it doesn't guarantee the buyer will complete the login. Your extension should gracefully handle the case where the buyer dismisses the prompt.- This API is only available on the Order status page. It isn't available on other customer account extension targets.