Shopify app oauth redirect_uri incorrect format after deployed on fly.io

Topic summary

OAuth redirect_uri used an invalid scheme after deployment to Fly.io, appearing as little-haze-0000.fly.dev://… instead of https://…, which triggered “Oauth error invalid_reques t: The redirect_uri is not whitelisted.” The app worked in dev, and manually changing the URL to https://… enabled installation.

A responder requested the Shopify object from Shopify.js, noting the redirect URL is generated from that configuration.

Root cause: fly.toml had HOST set without “https://” (HOST = “little-haze-0000.fly.dev”). Adding “https://” to HOST and redeploying corrected the redirect_uri and resolved the installation issue.

Notes:

  • OAuth is an authorization framework; redirect_uri is the callback URL used during authentication.
  • Configuration values (fly.toml HOST) and precise URLs are central to understanding the issue.

Status: Resolved. No further action items were identified.

Summarized with AI on January 23. AI used: gpt-5.

Thank you I have just found the issue by myself. In fly.toml I have missed the “https://” suffix in the HOST parameter:

HOST = "little-haze-0000.fly.dev"

I added the “https://” in front and re-deployed it and it is all good now.

1 Like