Skip to content

Add fallback redirect button for browser-restricted auto redirection #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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