Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

fixed app install #1022

Merged
merged 2 commits into from
Sep 23, 2019
Merged

fixed app install #1022

merged 2 commits into from
Sep 23, 2019

Conversation

pinpointcoder
Copy link
Contributor

Shopify koa auth install fails when the user is trying to install the app

Fixes (issue #)

During the shopify app install, shopify-koa-auth tries to redirect user to a page that does not exist (until the application is installed) yet. This causes the installation to fail. However when the user tries it for the second time, the cookie set in the previous exchange takes it through a different workflow and the application installation succeeds.

Type of change

There are two changes

  1. After setting a cookie, instead of redirecting to the application page (https://{SHOP}/admin/apps/{SHOP_SPI_KEY}) in their admin console, we will redirect them to the authentication page (https://{APPLICATION}/auth?shop={SHOP}) of the shopify app.

Until the shopify app is installed, this link https://{SHOP}/admin/apps/{SHOP_SPI_KEY} doesn't exist and hence the installation always fails the first time. By redirecting to the authentication page, the shopify app just tries to authenticate and installation proceeds.

  1. I also added a small test case that verifies the fix.
  • shopify-koa-auth Patch

@ghost ghost added the cla-needed label Sep 19, 2019
Copy link
Contributor

@katiedavis katiedavis left a comment

Choose a reason for hiding this comment

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

Tested in multiple cases! Looks good to me.
@pinpointcoder can you please sign the CLA and ping me when you've done so?

Copy link
Contributor

@ragalie ragalie left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks!

@pinpointcoder
Copy link
Contributor Author

Tested in multiple cases! Looks good to me.
@pinpointcoder can you please sign the CLA and ping me when you've done so?

Hi @katiedavis, I have signed the CLA. Thanks for the approval, glad I could help.

@ghost ghost removed the cla-needed label Sep 23, 2019
@marutypes marutypes merged commit 2cf6a3a into Shopify:master Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants