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

Commit f819f4a

Browse files
stevesweetsStephen Sweetland
and
Stephen Sweetland
authored
🐛 Retain host parameter after successful install (#900)
* 🐛 Retain host parameter after successful install * Include host parameter in default view for appbridge 2.0 * Style violation Co-authored-by: Stephen Sweetland <[email protected]>
1 parent 5a5541c commit f819f4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Traits/AuthController.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ public function authenticate(Request $request, AuthenticateShop $authShop)
5858
// Go to home route
5959
return Redirect::route(
6060
Util::getShopifyConfig('route_names.home'),
61-
['shop' => $shopDomain->toNative()]
61+
[
62+
'shop' => $shopDomain->toNative(),
63+
'host' => $request->host,
64+
]
6265
);
6366
}
6467
}

src/resources/views/layouts/default.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
var app = createApp({
3333
apiKey: "{{ \Osiset\ShopifyApp\Util::getShopifyConfig('api_key', $shopDomain ?? Auth::user()->name ) }}",
3434
shopOrigin: "{{ $shopDomain ?? Auth::user()->name }}",
35+
host: "{{ \Request::get('host') }}",
3536
forceRedirect: true,
3637
});
3738
</script>

0 commit comments

Comments
 (0)