hydropass
v1.0.0
Published
Generate secure Shopify Multipass login URLs for Hydrogen storefronts to seamlessly redirect users to the default Shopify checkout.
Downloads
20
Maintainers
Readme
Shopify Multipass URL
This package provides a utility function to generate secure Multipass login URLs for authenticated users in Shopify Hydrogen storefronts. It enables smooth redirection from your custom storefront to Shopify's native checkout, maintaining session integrity and ensuring a seamless shopping experience. Ideal for merchants using custom storefronts built with Hydrogen who want to leverage Shopify Multipass for checkout.
Install
npm install hydropassUsage
import hydropassify from "hydropass";
const multipass = hydropassify(env.MULTIPASS_SECRET);
const url = await multipass.generateUrl(
{
email: customerEmail,
return_to: checkoutURL,
},
env.PUBLIC_CHECKOUT_DOMAIN
);
// url = https://${your-domain}/account/login/multipass/${encoded-secret}
throw redirect(url);
