---
title: "Supporting Passkeys in Shop's Authentication Flows"
description: "Shop added passkeys (WebAuthn public-key credentials) to Shop Pay and the Shop app as a phishing-resistant alternative to email/SMS verification codes, using the webauthn-ruby gem in their Rails backend and serving the flow from an iframe so it works on merchant storefronts."
url: "https://swe.quest/articles/supporting-passkeys-in-shop-s-authentication-flows-83c5b8b12531ab5a"
canonical: "https://shopify.engineering/supporting-passkeys-in-shop-authentication-flows"
source: "Shopify Engineering"
published: "2023-03-24"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["identity-auth","ruby","ecommerce"]
---

# Supporting Passkeys in Shop's Authentication Flows

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2023-03-24, 6 min read, Case study. Original: [https://shopify.engineering/supporting-passkeys-in-shop-authentication-flows](https://shopify.engineering/supporting-passkeys-in-shop-authentication-flows)

## Summary

Shop added passkeys (WebAuthn public-key credentials) to Shop Pay and the Shop app as a phishing-resistant alternative to email/SMS verification codes, using the webauthn-ruby gem in their Rails backend and serving the flow from an iframe so it works on merchant storefronts. Registration uses options\_for\_create to generate a server-stored challenge, then verify\_registration to validate and store the credential; login uses verify\_authentication and updates the sign count. Lessons include restricting subdomain use, requesting platform authenticators with resident keys, and storing and deleting challenges to prevent replay. Conditional UI is held back because the no-passkey desktop experience can confuse users.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- public-key cryptography basics ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- web authentication flows ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Passkeys, WebAuthn, webauthn-ruby, Shop Pay, FIDO Alliance, Conditional UI, Ruby on Rails

## Related posts

- [Flexible Authentication: Reimagining authentication for millions of users at Airbnb](https://swe.quest/articles/flexible-authentication-reimagining-authentication-for-millions-of-users-at-ba6c3fb737afccb7.md): Airbnb Engineering · 2026-08-12 · Easy · 8 min read · Identity & auth, Product engineering, System design, Mobile
  Airbnb rebuilt login and signup around an "Identify first then Challenge" model.
- [Making Open Source Safer for Everyone with Shopify’s Bug Bounty Program](https://swe.quest/articles/making-open-source-safer-for-everyone-with-shopify-s-bug-bounty-program-48c56c4f3d09ee13.md): Shopify Engineering · 2022-06-15 · Medium · 5 min read · Application security, Ruby, Open source
  A Shopify bug bounty report showed that a leaked Rails development secret could be escalated to remote code execution because ActiveSupport's MessageEncryptor deserialized data with Marshal by default.
- [No Display? No Problem: Cross-Device Passkey Authentication for XR Devices](https://swe.quest/articles/no-display-no-problem-cross-device-passkey-authentication-for-xr-devices-74be2a6ea47edf54.md): Meta Engineering · 2026-02-04 · Medium · 5 min read · Identity & auth, Mobile, Security
  Meta adapted the FIDO CTAP hybrid (cross-device) passkey flow for displayless or inaccessible-display devices such as Quest headsets by replacing the QR code with a companion-app delivery path.
- [Authentication in Ionic Angular with Supabase](https://swe.quest/articles/authentication-in-ionic-angular-with-supabase-d02eec9140b86035.md): Supabase · 2022-11-08 · Medium · 33 min read · Identity & auth, Frontend, Mobile, PostgreSQL, TypeScript
  An Ionic Angular realtime messaging app built on Supabase demonstrates email/password signup and login, magic link authentication for web and native mobile, and route protection with Angular guards.
- [Supabase Auth: SSO, Mobile, and Server-side support](https://swe.quest/articles/supabase-auth-sso-mobile-and-server-side-support-6a2bc9b0f4a5ef26.md): Supabase · 2023-04-13 · Medium · 7 min read · Identity & auth, PostgreSQL, Multi-tenancy, Mobile
  Supabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
