Skip to content

Conversation

@naqashm
Copy link

@naqashm naqashm commented May 14, 2025

Summary

Some browsers block automatic redirection when initiated from an iframe or without a user gesture due to security restrictions (e.g., Chrome's cross-origin navigation policies). This update introduces a fallback button that allows users to manually trigger the redirect if the automatic redirection fails.

Changes

  • Added a <button> element to the redirect page.
  • Wrapped the redirection logic in a click event to ensure compliance with browser security policies.
  • Provides a better UX by enabling users to proceed manually when necessary.

Why This Is Needed

Automatic redirection can fail silently in certain browser contexts, particularly when embedded or without user interaction. The fallback ensures consistent user flow across all environments.

Testing

Tested in:

  • Chrome
  • Firefox
  • Safari

Redirection now works either automatically or via user interaction when needed.

@Kyon147
Copy link
Owner

Kyon147 commented May 18, 2025

This is a fair approach, I do think this is why Shopify have introduced the managed shopify flow which we have a PR for #415 which would remove this issue once everyone moves over.

I'll have a look at this PR once we get the managed flow out.

@naqashm
Copy link
Author

naqashm commented May 19, 2025

ok cool, thanks mate.

@naqashm
Copy link
Author

naqashm commented Jun 11, 2025

@Kyon147 Do we still need this after upgrading to the latest version 23.1.0? What about those who are not using Shopify's Managed App Installation?

@Kyon147
Copy link
Owner

Kyon147 commented Jun 11, 2025

This might be worthwhile for those that are not using managed installation and on Blade, as the issue only happens when using Blade as well I think.

@naqashm
Copy link
Author

naqashm commented Jun 11, 2025

Yes, please spare sometime to look into this PR. Thanks.

@naqashm
Copy link
Author

naqashm commented Jun 17, 2025

@Kyon147 Did you find time to check this one? As our app still facing this issue considering we are not using Shopify's Managed App Installation. Thank you.

@Kyon147
Copy link
Owner

Kyon147 commented Nov 7, 2025

Hi @naqashm

I think the issue was solved in another PR, but did introduce a new bug that I want to get a fix out for. If that fix solves it, I think we should be okay. I'd ideally like to remove the user having to click a button for continue in the flow for MPA.

So will keep this open for now, but we might not need it.

@naqashm
Copy link
Author

naqashm commented Nov 11, 2025

Thanks for the update, @Kyon147. That sounds good — we’ll wait to see how the new fix performs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants