-
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
Redirect to shopify managed install path during login #1818
Conversation
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.
Looks good, just the one question about the tests :)
"http://my-shop.myshopify.com", | ||
"https://admin.shopify.com/store/my-shop", | ||
].each do |good_url| | ||
test "#create redirects to Shopify managed install path instead if use_new_embedded_auth_strategy is enabled - #{good_url}" do |
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.
Do we / should we have a test for bad URLs?
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.
There are already tests for bad URLs, and the logic to redirect to invalid shop error happens regardless of "use new embedded auth strategy".. So I think the existing tests should be sufficient? If not it'll be pretty easy to add the extra cases like:
[
true,
false,
].each do |use_new_embedded_auth_strategy|
test "existing test cases for invalid urls"
#
#
end
Let me know if you want me to add it!
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.
Yeah if it's simple to duplicate it might help protect us against regressions just in case we ever change that code.
"https://admin.shopify.com/store/my-shop", | ||
].each do |good_url| | ||
test "#create redirects to Shopify managed install path instead if use_new_embedded_auth_strategy is enabled - #{good_url}" do | ||
ShopifyApp.configuration.wip_new_embedded_auth_strategy = true |
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.
might be a bit too late for this question, why do we have wip
in the name? Will it be changed to something more official in the future?
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.
Yess it's wip
right now since we're still building and merging feature incrementally. Once it's ready to be "shipped" officially, we'll rename this to be the same as Remix's future flag- unstable_new_embedded_auth_strategy
4ed367b
to
9a7dd5c
Compare
For issue:
Depends on issue: (not directly, but the redirects won't work properly unless we have token exchange)
📹 VIDEO DEMO
What this PR does
Redirect to Shopify managed install path during login instead of starting auth code OAuth flow.
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