-
Notifications
You must be signed in to change notification settings - Fork 699
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
Make EnsureAuthenticatedLinks compatible with AppBridge 2 #1277
Make EnsureAuthenticatedLinks compatible with AppBridge 2 #1277
Conversation
We are trying to get our application listed and we were just told that AppBridge 2.0 is a requirement. Pretty wild that this is still broken. |
@NabeelAhsen @rezaansyed @andyw8 |
a133064
to
5e75b50
Compare
Crazy this still isnt fixed |
This is why I avoid embedded apps. Too many headaches! |
@BranLiang I saw you merged another PR in this repo recently. Could you please review this one too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey it's been a while since I actively contributed to this gem. It seems that this PR keeps slipping through the cracks, I can help ship + release this change.
I'm approving this to unblock - but let's get this PR up to speed with the main branch and add some more test coverage in the event where host
isn't specified as a param by Shopify.
app/controllers/concerns/shopify_app/ensure_authenticated_links.rb
Outdated
Show resolved
Hide resolved
5e75b50
to
1b750a7
Compare
1b750a7
to
0b43c34
Compare
@NabeelAhsen Hey and Happy new year! We have a few more PR's that needs some attention to fully support AppBridge 2, improve JWT integration, and make the engine compatible with Ruby 3 and Rails 7. We're using this fork for these changes but it would be awesome to move these changes to the official repo. If you don't mind I will update them and mention you so we could merge & ship the new release. |
@kirillplatonov are the changes in this PR the only critical changes you've found to get this gem AppBridge 2.0 compatible for multi-pages apps? If not, could you link to the other PRs here as well? I'd like to prioritize shipping them and getting them released as the next minor version. |
@mjesar you need to pass def url_with_params(url, params)
uri = URI(url)
uri.query = params.compact.to_query
uri.to_s
end
callback_url = url_with_params(subscription_callback_url, {
shop: current_shop.shopify_domain,
host: current_shop.host
})
recurring_application_charge = ShopifyAPI::RecurringApplicationCharge.create(
name: "Plan Name",
price: 100,
return_url: callback_url,
)
fullpage_redirect_to recurring_application_charge.confirmation_url |
Thank you! it works now |
What this PR does
EnsureAuthenticatedLinks
is currently broken and doesn't passhost
header forAppBridge 2
. As a result, all deep links in the app are broken.I added the missing "host" header to redirect to the splash page to fix it.
Checklist
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersREADME.md
, if appropriate./docs
, if necessary