Skip to content
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

Keep original path and params when redirecting deep links to embed #1869

Merged

Conversation

kirillplatonov
Copy link
Contributor

@kirillplatonov kirillplatonov commented Jun 23, 2024

What this PR does

Fixes deep link behavior to make sure the original path and params are preserved after redirect to app embed. Right now all deep links are redirected to home page. In addition to deep links it fixes opening links in new tab in app embed.

CleanShot.2024-06-23.at.22.38.32.mp4

Checklist

Before submitting the PR, please consider if any of the following are needed:

  • Update CHANGELOG.md if the changes would impact users
  • Update README.md, if appropriate.
  • Update any relevant pages in /docs, if necessary
  • For security fixes, the Disclosure Policy must be followed.

@kirillplatonov kirillplatonov requested a review from a team as a code owner June 23, 2024 20:40
@kirillplatonov
Copy link
Contributor Author

cc @zzooeeyy @paulomarg

Copy link
Contributor

@zzooeeyy zzooeeyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! Looks good to me, I just have a small comment on the test case.

ShopifyApp.configuration.embedded_app = true

shop = "my-shop.myshopify.com"
get :redirect_to_embed, params: { shop: shop, foo: "bar" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add these extra params to test that it doesn't get included in the redirect?

Suggested change
get :redirect_to_embed, params: { shop: shop, foo: "bar" }
get :redirect_to_embed, params: { shop: shop, foo: "bar", host: "host", id_token:"id_token" }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated

@kirillplatonov
Copy link
Contributor Author

@matteodepalo resolved changelog conflict. Ready for merge

@matteodepalo matteodepalo merged commit c625c3b into Shopify:main Jul 3, 2024
6 checks passed
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.

None yet

3 participants