Code Monkey home page Code Monkey logo

multipassify's Introduction

Multipassify

Multipassify

Shopify Multipass module for Ruby

Shopify provides a mechanism for single sign-on known as Multipass. Multipass uses an AES encrypted JSON hash and multipassify provides functions for generating tokens

More details on Multipass with Shopify can be found here.

Installation

    gem install multipassify

Usage

To use Multipass an Enterprise / Plus plan is required. The Multipass secret can be found in your shop Admin (Settings > Checkout > Customer Accounts). Make sure "Accounts are required" or "Accounts are optional" is selected and Multipass is enabled.

  require 'multipassify'

  # Construct the Multipassify encoder
  multipassify = Multipassify.new 'SHOPIFY MULTIPASS SECRET'

  # Create your customer data hash
  customer_data = { email: '[email protected]', remote_ip:'USERS IP ADDRESS', return_to:"http://some.url"}

  # Encode a Multipass token
  token = multipassify.encode(customer_data)

  # Generate a Shopify multipass URL to your shop
  url = multipassify.generate_url(customer_data, 'yourstorename.myshopify.com')

  # Generates a URL like:  https://yourstorename.myshopify.com/account/login/multipass/<MULTIPASS-TOKEN>

Information & Credits

This is a Ruby Port from GitHub - beaucoo/multipassify: Shopify Multipass module for Node.js. Credits to @beaucoo and Shopify Multipass documentation!

multipassify's People

Contributors

renatodex avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multipassify's Issues

No login required using this gem

Hi when using this gem it redirects to the return_to without any session requirements.
When I am not logged in it works and when I am logged in it works. It does not seem
to be doing the check on Shopify. I checked the original node js lib to see if I could find any difference in what it is doing but it does not seem to be different.

Is this project still maintained and if so how can I fix this?

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.