Skip to content

Commit

Permalink
Merge branch 'main' into liz/external-redirect-on-action
Browse files Browse the repository at this point in the history
  • Loading branch information
lizkenyon authored Jan 18, 2024
2 parents 0b433a1 + 3fdb8d3 commit 4bbbd50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-starfishes-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/shopify-app-remix': patch
---

Minor refactor in login.ts to use new URL util method from shopify-api-js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export function loginFactory(params: BasicParams) {

const authPath = `${config.appUrl}${config.auth.path}?shop=${sanitizedShop}`;

const storeName = sanitizedShop.split('.')[0];
const installPath = `https://admin.shopify.com/store/${storeName}/oauth/install?client_id=${config.apiKey}`;
const adminPath = api.utils.legacyUrlToShopAdminUrl(sanitizedShop);
const installPath = `https://${adminPath}/oauth/install?client_id=${config.apiKey}`;

const shouldInstall =
config.isEmbeddedApp && config.future.unstable_newEmbeddedAuthStrategy;
Expand Down

0 comments on commit 4bbbd50

Please sign in to comment.