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

Update LoginProtection#fullpage_redirect_to to get shopify domain from session #401

Merged
merged 4 commits into from
Apr 10, 2017

Conversation

Hammadk
Copy link
Member

@Hammadk Hammadk commented Apr 10, 2017

In #398 we found that fullpage_redirect_to cannot be used when the :shop param is not present and the shop is already logged in. This PR solves this problem by grabbing the domain from the session.

At this point I am not sure if there is a better method of grabbing the domain. Another option is toShopifyApp::SessionRepository.retrieve(session[:shopify]).shopify_domain

Sidenote: Our setup for LoginProtectionTests is pretty weird. I'd like to unit test fullpage_redirect_to but that's not straight forward.

Copy link
Contributor

@kevinhughes27 kevinhughes27 left a comment

Choose a reason for hiding this comment

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

agreed the testing of that code is weird. This looks good to me though!

@Hammadk Hammadk changed the title WIP ~ Update LoginProtection#fullpage_redirect_to to get shopify domain from session Update LoginProtection#fullpage_redirect_to to get shopify domain from session Apr 10, 2017
@Hammadk
Copy link
Member Author

Hammadk commented Apr 10, 2017

@kevinhughes27 can you please give this another look. The last two commits fixed leaky tests that were setting ShopifyApp.configuration.embedded_app = false.

@Hammadk Hammadk merged commit de640b3 into master Apr 10, 2017
@Hammadk Hammadk deleted the update-sanitized-shop-name branch April 10, 2017 20:33
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

2 participants