< Back to Blog

Why Shopify Merchants Should Consider Multipass Authentication Over Proxy-Based Authentication

For Shopify merchants looking to offer a seamless user experience while ensuring robust security, choosing the right authentication method is crucial. With the growing need for integrated user experiences across multiple platforms and services, the choice between Multipass and proxy-based authentication becomes particularly relevant. In this blog, we’ll delve into why Multipass authentication is a superior choice for Shopify merchants aiming to enhance user experience and security.

Understanding Multipass Authentication

Multipass authentication is a secure, Shopify-specific single sign-on (SSO) solution designed to create a frictionless transition for users between a merchant’s main website and their Shopify store. When a user logs into the main site, Multipass uses a secure token to automatically authenticate the user on the Shopify store, eliminating the need for separate logins. This seamless integration not only improves user experience but also maintains high security standards by ensuring that sensitive user data is handled securely.

Enhanced User Experience

The primary advantage of Multipass authentication is the seamless user experience it offers. Customers expect a fluid navigation experience across different sections of a website, including the transition to the shopping area. Multipass eliminates the need for customers to log in multiple times, reducing friction and potential frustration. This smooth experience can lead to increased customer satisfaction, higher engagement, and potentially more sales.

Robust Security

Multipass leverages a secure hashing algorithm to generate tokens, ensuring that user data remains protected during the authentication process. This method minimises the risk of data breaches and unauthorised access, providing a secure environment for both merchants and their customers. In contrast, proxy-based authentication methods can be more vulnerable to security risks, as they often involve the handling of user credentials between different servers or domains.

Limitations of Proxy-Based Authentication

Proxy-based authentication involves a server (the proxy) sitting between the user and the web service, handling the user’s login information. While this can provide a level of integration between different systems, it comes with several drawbacks:

Why Multipass is the Better Choice

For Shopify merchants, the advantages of Multipass authentication are clear:

In conclusion, for Shopify merchants aiming to provide a seamless and secure online shopping experience, Multipass authentication emerges as the superior choice over proxy-based methods. By prioritising user experience and security, Multipass not only enhances customer satisfaction but also builds trust, fostering a loyal customer base and driving business growth.

Technical Implementation

Implementing Multipass requires generating a token containing the user’s information, which is then encrypted using a secure hash algorithm along with a shared secret. The encrypted token is passed to Shopify, which decrypts it, authenticates the user, and logs them into the store.

Generating the Multipass Token

Here’s a simplified example of how to generate a Multipass token in Python:

import json

import base64

import hashlib

from Crypto.Cipher import AES

from Crypto import Random

def multipass_generate(user_data, store_url, multipass_secret):

 # User data to be included in the token

 user_json = json.dumps(user_data, separators=(‘,’, ‘:’))

 # Encrypting the user data

 block_size = 16

 pad = lambda s: s + (block_size – len(s) % block_size) * chr(block_size – len(s) % block_size)

 cipher = AES.new(multipass_secret[0:16], AES.MODE_CBC, IV=Random.new().read(AES.block_size))

 encrypted_data = base64.b64encode(cipher.encrypt(pad(user_json)))

 # Creating the URL for automatic login

 url = f”https://{store_url}/account/login/multipass/{encrypted_data}”

 return url

# Example usage

user_data = {

 “email”: “user@example.com”,

 “created_at”: “2013-04-11T21:03:07Z”,

 “return_to”: “/welcome-back”

}

store_url = “yourstore.myshopify.com”

multipass_secret = “YourMultipassSecret”

login_url = multipass_generate(user_data, store_url, multipass_secret)

print(login_url)

This example demonstrates the creation of a user-specific URL that automatically logs the user into the Shopify store when accessed, providing a smooth transition from the main site to the store.