Skip to content

Issue: App Redirection Loop / "Refused to Connect" on Frame Reload #194

@alihasnainh3techs

Description

@alihasnainh3techs

When the application frame is manually reloaded or the session expires, the app redirects the user to a standalone login UI (requesting the shop domain). After entering the domain, the application attempts to load accounts.shopify.com within the iframe, which is blocked by Shopify's X-Frame-Options: DENY (or Content-Security-Policy) headers. This results in a broken UI and a "refused to connect" error.

Steps to Reproduce

  1. Open the app within the Shopify Admin dashboard.
  2. Manually reload the iframe or trigger a session timeout.
  3. Observe the redirect to the internal "Log in" form
Image
  1. Enter a valid shop domain and click "Log in".
  2. The iframe displays a connection refused error.
Image

Expected Behavior

The app should detect it is being loaded within an iframe and use a Top-level Redirect (using App Bridge or a script like window.top.location.href) to handle authentication outside of the iframe.

Visual Evidence

  1. Unexpected Login UI within Iframe:
  2. Connection Refused Error:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions