Code Monkey home page Code Monkey logo

plug_shopify_embedded_switch's Introduction

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:

def deps do
  [
    {:plug_shopify_embedded_switch, "~> 0.1.0"}
  ]
end

plug_shopify_embedded_switch's People

Contributors

byjpr avatar

Stargazers

 avatar

Watchers

 avatar

plug_shopify_embedded_switch's Issues

Test for possible attack vectors

The simplicity of the plug makes me think that there could be vectors in how we switch between the two methods that need to be explored. For example; what happens if we supply an empty shop url param?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.