https://github.com/byjpr/plug_shopify_embedded_switch
Switches auth between URL Params and JWT, designed for Shopify App Bridge
https://github.com/byjpr/plug_shopify_embedded_switch
app-bridge elixir plug shopify shopify-app shopify-embedded-applications
Last synced: 2 months ago
JSON representation
Switches auth between URL Params and JWT, designed for Shopify App Bridge
- Host: GitHub
- URL: https://github.com/byjpr/plug_shopify_embedded_switch
- Owner: byjpr
- License: agpl-3.0
- Created: 2021-07-16T23:36:19.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-19T23:07:37.000Z (almost 4 years ago)
- Last Synced: 2025-02-27T11:24:32.666Z (3 months ago)
- Topics: app-bridge, elixir, plug, shopify, shopify-app, shopify-embedded-applications
- Language: Elixir
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PlugShopifyEmbeddedSwitch
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.## What data does this plug create?
This plug will set three keys in the private object.1. `conn.private[:shopify_url_config]` Shop Origin URL
2. `conn.private[:shopify_jwt_config]` JWT Object
3. `conn.private[:shop_origin_type]` will return either `:jwt` or `:url`## Usage
1. Follow Installation instructions below
2. Add plug to your pipeline `plug PlugShopifyEmbeddedSwitch`## Installation
The package can be installed by adding `plug_shopify_embedded_switch` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:plug_shopify_embedded_switch, "~> 0.1.0"}
]
end
```