Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
🐛 Retain host parameter after successful install (#900)
Browse files Browse the repository at this point in the history
* 🐛 Retain host parameter after successful install

* Include host parameter in default view for appbridge 2.0

* Style violation

Co-authored-by: Stephen Sweetland <stephen@projectlambda.com>
  • Loading branch information
stevesweets and Stephen Sweetland committed Jul 15, 2021
1 parent 5a5541c commit f819f4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Traits/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ public function authenticate(Request $request, AuthenticateShop $authShop)
// Go to home route
return Redirect::route(
Util::getShopifyConfig('route_names.home'),
['shop' => $shopDomain->toNative()]
[
'shop' => $shopDomain->toNative(),
'host' => $request->host,
]
);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/resources/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
var app = createApp({
apiKey: "{{ \Osiset\ShopifyApp\Util::getShopifyConfig('api_key', $shopDomain ?? Auth::user()->name ) }}",
shopOrigin: "{{ $shopDomain ?? Auth::user()->name }}",
host: "{{ \Request::get('host') }}",
forceRedirect: true,
});
</script>
Expand Down

0 comments on commit f819f4a

Please sign in to comment.