Customer Account API on Hydrogen 2024.1, wrong redirect on oauth/authorize

Hello,

I’m testing the Customer Account APIs on an Hydrogen storefront using version 2024.1.1 and I’m having a strange issue.

The setup of customerAccount client is very simple:

const customerAccount = createCustomerAccountClient({
  request,
  session,
  customerAccountId: env.CUSTOMER_ACCOUNT_API_PUBLIC_CLIENT_ID,
  customerAccountUrl: env.CUSTOMER_ACCOUNT_API_ENDPOINT,
});

And in the login page the code also is very easy:

import type {LoaderFunctionArgs} from '@shopify/remix-oxygen';

export async function loader({params, request, context}: LoaderFunctionArgs) {
  return context.customerAccount.login();
}

However, when I go to the login page I can see the redirect to https://shopify.com/authentication/SHOP_ID/auth/oauth/authorize not working as expected:

The documentation says the redirect URL should be

GET https://shopify.com/authentication/

So there seems to be an `/auth` more.

I found the authorize path to be hardcoded in Hydrogen until [this](https://github.com/Shopify/hydrogen/pull/2437/files) PR but I can't understand if this may be related to something I've set on Shopify Admin or if it's just a deprecation.

Anyone else on Hydrogen before 2024.07 having similar issues?

Thank you all

Hi @NaeemSid thanks for your answer.

The URLs in Shopify Admin seems correct:

Also I’m using the default callback URLs and that section cannot be edited:

Keep in mind the problem is not between /oauth/authorize in shopify.com to /account/authorize in Hydrogen but from /account/login in Hydrogen to shopify.com, where Hydrogen wants to go to /auth/oauth/authorize but shopify.com accepts just /oauth/authorize.

On Github you can see the hardcoded paths between 2024.1.1 (code) to 2024.7.9 (code)

Thanks