Rotation vs Recovery
The two operations look superficially similar but serve different purposes and follow different authorization paths:If you have already lost access to your passkey, use account recovery instead. Credential rotation cannot proceed without the current credential.
What Rotation Guarantees
The wallet contract’srotate_passkey() operation provides a hard guarantee: only the bound credential changes. The entire rest of the wallet state is untouched.
Before rotation:
The Rotation Flow
1
Authenticate
The user authenticates with their current passkey. This proves they still control the wallet and authorizes the rotation request.
2
Generate New Credential
The user creates a new passkey on the target device — the one they want to use going forward. The new passkey produces a public key and credential ID that will replace the current binding.
3
Proof of Possession
The new passkey must prove it actually controls the private key it claims to have. SocketFi issues a challenge, the new passkey signs it, and the signature is verified before the rotation can proceed. This step prevents an attacker from injecting a credential they do not control.
4
Rotation Authorized
The current passkey signs an authorization message that includes the new credential’s public key, the wallet’s current nonce, and an expiration window. This binds the current owner’s approval to the specific new credential being registered.
5
Wallet Updated
The wallet contract verifies the authorization (current credential signature, nonce, expiration) and the proof of possession (new credential’s challenge response). Both must pass. If they do, the passkey rotation executes and the new credential becomes the active binding.
When to Rotate
Getting a new device
Rotate before you wipe or dispose of your old device. Authenticate on the old device, register the new passkey, rotate — then the old device’s passkey no longer controls the wallet.
Security policy compliance
Organizations that require periodic credential refresh can implement a rotation schedule without migrating assets or changing wallet addresses.
Migrating passkey providers
Moving from a hardware security key to a platform passkey (or vice versa) is a rotation — same wallet, new credential.
Proactive security
If you suspect your passkey may have been compromised but you still have access, rotate immediately rather than waiting for unauthorized activity.