Getting redirect_uri error after Setup for using Customer Account API

Topic summary

A developer is encountering a redirect_uri error while setting up the Customer Account API in a Hydrogen project, despite following the template’s README instructions.

Setup completed:

  • Configured ngrok tunnel for local development
  • Set environment variables (PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID and PUBLIC_CUSTOMER_ACCOUNT_API_URL)
  • Configured the Headless app in Shopify admin with the ngrok domain
  • Added the ngrok domain to the Content Security Policy

Issue:
The error persists even after proper configuration. The developer notes the ngrok tunnel appears unused, suggesting a potential routing or configuration mismatch.

Status:
The issue remains unresolved. The developer, being fairly new to Hydrogen, is seeking guidance on what might have been configured incorrectly or overlooked in the setup process.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

So I’ve try to follow the instruction from the readme of the template when a hydrogen project is created so I can access the /account route with the Customer Account API.

Here’s what I’ve done:

1- I’ve setup the ngrok tunnel,

2- Set up the PUBLIC_CUSTOMER_ACCOUNT_API_CLIENT_ID and PUBLIC_CUSTOMER_ACCOUNT_API_URL in my .env file

3- I’ve also configure the Application setup from the Headless APP on the store with my ngrok domain.

4- Added the ngrok doman to the content security policy

But I always end up seeing this error:

It’s as if the ngrok tunnel isn’t use at all which is really confusing
I’m fairly new to hydrogen so I’m not sure what’s happening there

Any help or pointer on what I might have done wrong would be appreciated.

Thanks