--- title: hydrogenStorefrontCustomerApplicationUrlsReplace - GraphQL Admin description: |- Updates the customer account application URLs for a Hydrogen storefront, configuring the authentication and redirect endpoints used by Shopify's Customer Account API integration. This mutation validates URL formats and security requirements. For example, when setting up customer login functionality, developers configure the JavaScript origin for client-side authentication, logout redirect URIs for post-signout navigation, and the primary redirect URI for successful authentication flows. Use `hydrogenStorefrontCustomerApplicationUrlsReplace` to: - Configure customer authentication endpoints - Update redirect URLs for login and logout flows - Modify JavaScript origins for client-side integration - Validate URL security and format requirements The mutation replaces all existing URLs with the new configuration, ensuring consistent authentication behavior across the storefront. Detailed error reporting helps developers verify the configuration meets Shopify's security standards. Learn more about [Customer Account API integration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/hydrogenstorefrontcustomerapplicationurlsreplace md: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/hydrogenstorefrontcustomerapplicationurlsreplace.md --- # hydrogen​Storefront​Customer​Application​Urls​Replace mutation Requires Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel. Updates the customer account application URLs for a Hydrogen storefront, configuring the authentication and redirect endpoints used by Shopify's Customer Account API integration. This mutation validates URL formats and security requirements. For example, when setting up customer login functionality, developers configure the JavaScript origin for client-side authentication, logout redirect URIs for post-signout navigation, and the primary redirect URI for successful authentication flows. Use `hydrogenStorefrontCustomerApplicationUrlsReplace` to: * Configure customer authentication endpoints * Update redirect URLs for login and logout flows * Modify JavaScript origins for client-side integration * Validate URL security and format requirements The mutation replaces all existing URLs with the new configuration, ensuring consistent authentication behavior across the storefront. Detailed error reporting helps developers verify the configuration meets Shopify's security standards. Learn more about [Customer Account API integration](https://shopify.dev/docs/storefronts/headless/building-with-the-customer-account-api/getting-started). ## Arguments * storefront​Id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required The ID of the storefront. * urls​Replace​Input [Hydrogen​Storefront​Customer​Application​Urls​Replace​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/HydrogenStorefrontCustomerApplicationUrlsReplaceInput) required An object of fields to update on the customer oauth application. *** ## Hydrogen​Storefront​Customer​Application​Urls​Replace​Payload returns * javascript​Origin [\[String!\]](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) List of allowed javaScript url origins. * logout​Uris [\[String!\]](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) List of allowed urls that can be redirected to post-logout. * redirect​Uri [\[String!\]](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) List of allowed callback urls. * success [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Whether the customer application was updated successfully. * user​Errors [\[Hydrogen​Storefront​Customer​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/HydrogenStorefrontCustomerUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### hydrogenStorefrontCustomerApplicationUrlsReplace reference ## Mutation Reference ```graphql mutation hydrogenStorefrontCustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) { hydrogenStorefrontCustomerApplicationUrlsReplace(storefrontId: $storefrontId, urlsReplaceInput: $urlsReplaceInput) { javascriptOrigin logoutUris redirectUri success userErrors { field message } } } ``` ## Input ##### Variables ```json { "storefrontId": "gid://shopify//10079785100", "urlsReplaceInput": { "redirectUri": { "add": [ "" ], "removeRegex": "" }, "javascriptOrigin": { "add": [ "" ], "removeRegex": "" }, "logoutUris": { "add": [ "" ], "removeRegex": "" } } } ``` ##### Schema ```graphql input HydrogenStorefrontCustomerApplicationUrlsReplaceInput { redirectUri: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput javascriptOrigin: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput logoutUris: HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput } input HydrogenStorefrontCustomerApplicationUrlsReplaceUriInput { add: [String!] removeRegex: String } ```