# Require Login The API for interacting with the authentication. ## OrderStatusApi The API object provided to this and other `customer-account.order-status` extension targets. ### Docs_OrderStatus_RequireLoginApi ### requireLogin value: `() => Promise` The requireLogin() method triggers login if the customer is viewing pre-authenticated Order status page. ## Related - [Order status page](https://shopify.dev/docs/apps/customer-accounts/order-status-page) ## Examples The API for interacting with the authentication. Call requireLogin before triggering an action ```jsx import React, { useEffect, useState } from "react"; import { Button, reactExtension, useApi, } from "@shopify/ui-extensions-react/customer-account"; export default reactExtension( "customer-account.order-status.block.render", () => ); function BlockExtension() { const { requireLogin } = useApi<"customer-account.order-status.block.render">(); async function reportAnIssue() { await requireLogin(); // send a request to backend } return ; } ``` ```js import React from "react"; import { extension, Button } from "@shopify/ui-extensions-react/customer-account"; export default extension( "customer-account.order-status.block.render", (root, api) => { async function reportAnIssue() { await api.requireLogin(); // send a request to backend } root.appendChild( root.createComponent(Button, { onPress: reportAnIssue }, "Report an issue"), ); }); ```