Passkeys in 2023: Designing registration, sign-in and account recovery together
Connect Google’s 2023 passkey rollout with WebAuthn verification and manage challenges, RP IDs, credential records, backup devices and recovery in one test plan.
Archive retrospective · Topic year 2023
In this article
- Read the 2023 rollout precisely
- Bind the challenge and RP identity on the server
- Test sign-in against replay and account confusion
- Design device loss as a primary journey
- Manage migration with measurable gates
- Test recovery policy in the credential inventory
- Manage new device enrollment separately from the last access path
Read the 2023 rollout precisely
On May 3, 2023, Google began offering passkeys as an option for Google Accounts across major platforms. The announcement was written by Christiaan Brand and Sriram Karra for the US-based Google Blog. In October, creation prompts became the default direction for personal accounts, but passwords were not immediately removed. That distinction matters: the 2023 event was a broad product rollout toward passwordless sign-in, not the disappearance of recovery paths. FIDO Alliance enterprise guidance from 2023 likewise asks organizations to match support, device models and recovery choices to their users.
Bind the challenge and RP identity on the server
The server should create registration options and bind an unpredictable challenge, rp.id, user identity and excludeCredentials to the ceremony. A returned PublicKeyCredential is not accepted merely because the client reports success. Using a maintained WebAuthn library, verify the challenge, origin, RP ID hash and signature, then store credential ID, public key, user relation and relevant backup or counter state. Biometric material does not reach the site. Prevent one credential identifier from being linked to another account and support multiple passkeys per user. Avoid copying challenges or credential material into broad application logs.
Test sign-in against replay and account confusion
Generate a fresh challenge for every authentication ceremony, keep it briefly and consume it after one use. In discoverable-credential flows without a typed username, map the returned userHandle to the correct account. Do not validate origin and rpId with a loose suffix check; define explicit trust boundaries for production, test and subdomains. After signature verification, confirm that the credential record is still enabled. Negative tests should include replayed challenges, a wrong origin, another account’s userHandle, a deleted credential and failed user verification. The user-facing response can remain general while the security log records distinct reason codes.
Design device loss as a primary journey
A synchronized passkey may ease device replacement, while a device-bound security key needs a different recovery model. FIDO guidance recommends considering backup authenticators and separate administrative identities for higher-assurance accounts. Show users a list of registered passkeys with names, creation time and last use, and provide a way to revoke a lost device’s credential. If recovery falls back only to SMS or weak knowledge questions, strong sign-in can be defeated by a weaker path. Exercise three cases with support staff: a new phone, a stolen device and loss of access to the passkey-provider account.
Manage migration with measurable gates
Begin with a small pilot whose device mix is known. Track registration completion, first-attempt sign-in, fallback use, lockouts and revocation time as separate metrics. Do not delete passwords solely because registration succeeded; evaluate passkey success and recovery readiness together. Administrative accounts should not share the ordinary user recovery policy: use separate credentials and stronger approval. The rollout gate should require a tested browser and operating-system matrix, recovery using a second device, server-side negative tests and an accessible alternative journey. Counters must come from real events, and example activity must never be presented as genuine user engagement.
Test recovery policy in the credential inventory
Adding a passkey should not permanently equate an account with one device. Model multiple credentials as separate rows belonging to the same user. The local example registers test credentials A and B, revokes A and confirms that B remains active. Removing the last active credential is rejected until another access path has been verified. The policy is explicit rather than allowing a successful settings action to lock the user out. The SQLite experiment does not verify an actual WebAuthn signature. It tests inventory and removal rules for an already authenticated account. A production relying party must separately verify the challenge, origin, relying party identifier, signature and user verification policy. Every inventory query is scoped to the authenticated user; a user identifier supplied by a browser is not sufficient authority. The executed checks cover adding a second credential, removing the first, refusing removal of the last and excluding credentials belonging to another account. Only synthetic identifiers are stored. No private keys, biometric information or real account data are involved. This narrow test provides concrete evidence for discussing the account behavior after a device is lost.
import assert from 'node:assert/strict';
import {DatabaseSync} from 'node:sqlite';
const results={};
const db=new DatabaseSync(':memory:');try{
db.exec('CREATE TABLE credentials(user_id INTEGER,credential_id TEXT PRIMARY KEY,revoked_at TEXT); INSERT INTO credentials VALUES(17,\'A\',NULL),(17,\'B\',NULL),(18,\'OTHER\',NULL)');
const active=user=>db.prepare('SELECT credential_id FROM credentials WHERE user_id=? AND revoked_at IS NULL ORDER BY credential_id').all(user).map(row=>row.credential_id);
const revoke=(user,key)=>{db.exec('BEGIN IMMEDIATE');try{const rows=active(user);if(!rows.includes(key)||rows.length<=1){db.exec('ROLLBACK');return false}db.prepare('UPDATE credentials SET revoked_at=? WHERE user_id=? AND credential_id=? AND revoked_at IS NULL').run('2026-12-03',user,key);db.exec('COMMIT');return true}catch(error){db.exec('ROLLBACK');throw error}};
assert.deepEqual(active(17),['A','B']);assert.equal(revoke(17,'A'),true);assert.deepEqual(active(17),['B']);assert.equal(revoke(17,'B'),false);assert.equal(revoke(17,'OTHER'),false);assert.deepEqual(active(18),['OTHER']);
results.passkeyInventory={initial:['A','B'],revoked:'A',remaining:active(17),lastRemovalRefused:true,foreignCredentialRefused:true,scope:'Credential inventory policy only; does not verify WebAuthn signatures'};
}finally{db.close()}
console.log(results.passkeyInventory);
Manage new device enrollment separately from the last access path
Account settings should explain which credentials exist and what a removal will change. Show enrollment and last usage information only when the service actually records it. Count the remaining access paths before removal, but enforce the rule on the server. Two tabs can otherwise read the same old count and remove the last two credentials concurrently. Recheck the inventory within the transaction rather than trusting a number rendered earlier in the interface. Recovery belongs to the security boundary. A support process that enrolls a credential for anyone who knows an email address can undermine strong sign in. Specify the required evidence, notifications and any waiting period according to the product's risks. This article does not prescribe one universal recovery threshold for all services. The 2023 subject label does not imply identical synchronization or recovery behavior across platforms. Credential storage, transport between devices and account management are separate layers. WebAuthn defines the authentication mechanism; it does not automatically design an application's account lifecycle. Retain the working inventory test alongside an explicit list of the authentication layers it does not exercise. That distinction gives maintainers a usable recovery contract rather than an apparently complete demonstration with hidden assumptions.
Source event:
Christiaan Brand ve Sriram Karra / Google — passkey açılımı, 3 Mayıs 2023 (ABD) ↗Google for Developers — sunucu tarafı passkey kayıt doğrulaması ↗FIDO Alliance — 2023 kurumsal passkey ve kurtarma rehberi ↗
Reader discussion
What would your team's first verification step be for this security risk?
No comments yet. Be the first to contribute.
Write a comment