Skip to content

hawflakes/shopify-multipass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shopify-multipass

Shopify Multipass module for Python

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

$ pip install shopify-multipass

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.

# Construct the Multipassify encoder
from multipass import Multipass

multipass = Multipass('SHOPIFY MULTIPASS SECRET');

# Create your customer data hash
customerData = {'email': '[email protected]', 'return_to': 'http://some.url'};

# Generate a Shopify multipass URL to your shop
url = multipass.generateURL(customerData, 'yourstorename.myshopify.com');

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

References

multipassify

About

Shopify Multipass module for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages