Should you look for the URL Params or the JWT? PlugShopifyEmbeddedSwitch tests the current conn
and informs your app which configuration to pay attention to.
This plug will set three keys in the private object.
conn.private[:shopify_url_config]
Shop Origin URLconn.private[:shopify_jwt_config]
JWT Objectconn.private[:shop_origin_type]
will return either:jwt
or:url
- Follow Installation instructions below
- Add plug to your pipeline
plug PlugShopifyEmbeddedSwitch
The package can be installed by adding plug_shopify_embedded_switch
to your list of dependencies in mix.exs
:
def deps do
[
{:plug_shopify_embedded_switch, "~> 0.1.0"}
]
end